Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: problem w/ LWP::UserAgent?

by dorianwinterfeld (Acolyte)
on May 30, 2013 at 17:45 UTC ( [id://1036102]=note: print w/replies, xml ) Need Help??


in reply to Re: problem w/ LWP::UserAgent?
in thread problem w/ LWP::UserAgent?

This is what I get:
C:\Documents and Settings\dorian>perl
print $];
use CGI qw/:standard/;
use CGI::Carp (fatalsToBrowser);
require LWP::UserAgent;

print header;

 my $ua = LWP::UserAgent->new;

 my $url = 'http://google.com';

 my $response = $ua->get($url);

 if ($response->is_success) {
     print $response->decoded_content;  # or whatever
 }
 else {
     die "failed: $url : ", $response->status_line;
 }
^Z
5.016003Content-Type: text/html; charset=ISO-8859-1

Software error:

failed: http://google.com : 500 Status read failed: A non-blocking socket o
peration could not be completed immediately. at - line 18.

For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.

Thu May 30 13:43:04 2013 -: failed: http://google.com : 500 Status read failed : A non-blocking socket operation could not be completed immediately. at - line 18.

Replies are listed 'Best First'.
Re^3: problem w/ LWP::UserAgent?
by BrowserUk (Patriarch) on May 30, 2013 at 18:33 UTC

    Have you installed some SSL module or another?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      not intentionally

        The LWP I used in my test was the one that came with my copy of 5.16.1.

        Seems weird that your copy performs differently if you have not installed anything extra?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
      No, I didn't. I am still trying to debug this problem.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-28 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found