[ic] LWP::UserAgent error
Bryan Gmyrek
bryangmyrek at yahoo.com
Fri May 13 14:14:23 EDT 2005
>On May 13, 2005, at 10:34 AM, daniel castro wrote:
>Thanks for the reply, changing to UserAgent really helped, also the
::LogError, now the error log shows this:
>157.253.41.19 6KJERhED:157.253.41.19 - [13/May/2005:16:42:13 +0000]
plcost /cgi-bin/plcost/test.html Runtime error: Can't locate object
method "get" via package
"http://>www.larepublica.com.co/inc/imagenes/indicad.php?env=7m9r5j5c"
(perhaps you forgot to load
"http://www.larepublica.com.co/inc/imagenes/indicad.php?env=7m9r5j5c"?)
at (tag >'exchange_rate') line 7.
>I have no idea how to solve this.
You need to review the syntax for using LWP::UserAgent, it's more
complicated than that for simple.
Use something like:
my $page;
my $browser = LWP::UserAgent->new;
$browser->timeout(10);
my $response = $browser->get( $url );
if($response->is_success){
$page = $response->content;
return $page;
} else {
# ERROR
return $response->status_line;
}
or something ...
see
perldoc LWP::UserAgent for more info.
Bryan
<a href="http://www.neartexpress.com">Posters and Art Prints</a>
More information about the interchange-users
mailing list