in reply to CPAN LWP Install won't return local requests

The code works fine for me too, but I'm not local. It would be interesting to step through it with the Perl debugger and see if something odd is happening inside LWP::Simple, probably with name resolution which is happening locally. Are you running a virtual host Apache server or is there an entry for jtrue.com in your /etc/hosts file? That would explain the anomalous behavior.

HTH,
SSF

  • Comment on Re: CPAN LWP Install won't return local requests

Replies are listed 'Best First'.
Re^2: CPAN LWP Install won't return local requests
by true (Pilgrim) on Dec 20, 2009 at 16:18 UTC
    FYI, i run my own DNS and i am servering properly through named. You can poing, dig, and whois me from anywhere with no problems. You can even "get" my homepage with LWP::Simple from any other webserver.

    Here's some more data though i just uncovered...

    I download a local copy of LWP and renamed it JTLWP::Simple (sorry but i had to be sure i was using my own version)

    I looked at the "get" method inside and saw this...

    $response->decoded_content
    I changed it to this...
    $response->content
    And now i get a response from my LWP::Simple get requests. SO i guess this means my LWP library has a broken decoder?? ANyone else seen this or have any ideas?

    Thanks Monks!

    jtrue
      Which version of LWP::UserAgent? Where is your LWP::UserAgent code? Did you turn on LWP::Debug?
        #!/usr/bin/perl use LWP; print "This is libwww-perl-$LWP::VERSION\n";

        this script outputs: libwww-perl-5.834
        My perl is v5.6.1 built for i386-linux

        The code above (in my very first post) is my LWP code. I am trying to use LWP::Simple.

        LWP::Debug says it is deprecated. I am trying to see if i can use that to gain some clues, but the man pages are not really helping me.

        Also here are the versions for LWP::Simple and LWP::UserAgent courtesy of CPAN

        cpan> install LWP::Simple LWP::Simple is up to date (5.827) cpan> install LWP::UserAgent LWP::UserAgent is up to date (5.834).
        jtrue
        This has led me down the road of noticing that the module Encode is required by LWP and Encode will not install on my server. I'm not sure what to do to fix this but i just thought i would update this ticket.
        jtrue