Forex

 view release on metacpan or  search on metacpan

Forex.pm  view on Meta::CPAN

	my ($self) = @_;
	my ($response);
		   
	if ( !$self->{'LWP_OBJ'} )
		{  $self->{ 'LWP_OBJ' } = new LWP::UserAgent();
		   $self->{ 'LWP_OBJ' }->timeout( $self->{'TIMEOUT'} );  }

	      $response = $self->{'LWP_OBJ'}->get( $self->{ 'REQUEST_URL' } );

	if ( $response->is_success )
	   { $self->{ 'CONTENT' } = decode_json $response->decoded_content; $LASTERROR = undef; }
	else
		{ $self->{ 'ERROR'} = decode_json $response->decoded_content;
		  $LASTERROR = 1; }
		
	delete $self->{ 'REQUEST_URL' };

	1;
}

=pod

=head3 get_rates_from ( $from_date , $to_date ) 



( run in 0.234 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )