Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: LWP::UserAgent error Unexpected keys - LocalHost

by Khen1950fx (Canon)
on Jul 30, 2014 at 01:52 UTC ( #1095543=note: print w/replies, xml ) Need Help??


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

Here's a slightly modified script that worked on my versions of perl from 5.8.8 thru 5.20.0. Note: Always use strictures.
#!/usr/bin/perl -l use strict; use warnings; require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent("Mozilla/8.0"); $ua->cookie_jar( { file => 'mycookies.txt', autosave => 1 } ); my $url = 'http://www.perlmeme.org/'; my $req = HTTP::Request->new( 'GET', $url ); my $res = $ua->request( $req, undef, undef ) || die( 'Get'->Bad ); if ( $res->is_success ) { print $res->decoded_content; } else { print ">> ", $res->status_line; }

Replies are listed 'Best First'.
Re^2: LWP::UserAgent error Unexpected keys - LocalHost
by Anonymous Monk on Jul 30, 2014 at 02:48 UTC

    Here's a slightly modified script that you can ignore

    That won't make any difference

    The OPs IO::Socket::SSL/IO::Socket::IP... and other supporting LWP modules are out of sync (one is new other is old)

    OP needs the latest ones and to learn to ignore irrelevant advice

      Thanks for the suggestions. I still cannot figure what tweak would fix it for me.

      So I've taken the pragmatic approach and installed a parallel 'ActiveState' perl.

      It has all the right modules pre-installed. And LO, all the tests that failed previously now work with the Active Perl.

      It's a good enough compromise until I get my upgrade PC up and running.

      Regards to all.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2020-06-07 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (42 votes). Check out past polls.

    Notices?