I'm trying to implement the following code:
######################################################
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
my $response = $ua->get('http://search.cpan.org/');
if ($response->is_success) {
print $response->content; # or whatever
}
else {
die $response->status_line;
}
######################################################
The code works but what I don't get is how do I know if LWP::UserAgent
(or even LWP) is installed on my machine.
If I use the Perl Package Manager and type: query LWP
I get the following:
Querying target 1 (ActivePerl 5.8.7.815)
1. LWP-UserAgent-Determined [1.03] a virtual browser that retries errors
This is a module (?) I installed myself.
Is LWP::UserAgent installed--I guess it must be because the code works.
Can someone explain this?
Cheers,
Chris
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>