Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: LWP::UserAgent error Unexpected keys - LocalHost

by trendle (Novice)
on Jul 29, 2014 at 22:18 UTC ( [id://1095526]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP::UserAgent error Unexpected keys - LocalHost
in thread LWP::UserAgent error Unexpected keys - LocalHost

Hi,

sorry to say, but Mechanize uses LWP::UserAgent under the bonnet as far as I can gather. So the net result remains the same.

use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get($url); if ( $mech->success() ) { print $mech->content,"\n"; } else { print "status is: " . $mech->status,"\n"; }

Returns

try_web_again.pl Error GETing http://perlmeme.org/tutorials/lwp.html: Unexpected keys - + LocalHost at /home/bill/bin/try_web_again.pl line 15

Also, according to cpan...

Database was generated on Tue, 29 Jul 2014 06:06:23 GMT All modules are up to date for LWP

So it seems thast I have the latest LWP

regards.

Replies are listed 'Best First'.
Re^3: LWP::UserAgent error Unexpected keys - LocalHost
by Anonymous Monk on Jul 29, 2014 at 23:51 UTC

    sorry to say, but Mechanize uses LWP::UserAgent under the bonnet as far as I can gather.

    Yes, thats the point, its less typing. Autocheck dies on errors, like you witnessed. No setting up a cookiejar, no saving responses... less typing is less typing :)

    So it seems thast I have the latest LWP ..

    That isn't exactly convincing :) LWP has many dependencies, upgrade all of them :)

    You could tty  perl -MCarp::Always yourprog.pl for a stack trace to narrow down which IO::Socket... module is complaining, which module needs specific updating

    Probably IO::Socket::IP and IO::Socket::SSL

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1095526]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-03-29 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found