Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Old version of LWP::Agent

by parser (Novice)
on Apr 27, 2012 at 03:24 UTC ( #967503=perlquestion: print w/ replies, xml ) Need Help??
parser has asked for the wisdom of the Perl Monks concerning the following question:

Yes, I know LWP::Agent was ugly and somewhat broken but I would like to steal, err, borrow some functionality from it but I cannot seem to find a version that has not been emasculated (read deprecated).

Any thoughts? Is there a location for modules older than can be found on CPAN?

Cheers

Comment on Old version of LWP::Agent
Re: Old version of LWP::Agent
by Anonymous Monk on Apr 27, 2012 at 03:38 UTC

    Any thoughts?

    Ask a question that can be answered

      Pointing to the location of an intact version of LWP::Debug wouldn't appear to be intractable. Or are you being irascible?

        Pointing to the location of an intact version of LWP::Debug wouldn't appear to be intractable. Or are you being irascible?

        The new interface that LWP::Debug documents is much simpler/better way of doing things.

        Anyway, to find all the versions in the simplest possible way, even the BACKpan-ed ones, use https://metacpan.org/release/libwww-perl

        Or are you being irascible?

        No, but you're being very cryptic and rude

Re: Old version of LWP::Agent
by Marshall (Prior) on Apr 27, 2012 at 03:55 UTC
    I don't know boo about LWP:Agent. I have used LWP::UserAgent - works well. To the best of my knowledge, WWW::Mechanize uses that module also - so it is in current use.

    I don't know what "steal, borrow" means. I would just call the LWP::UserAgent routines / inherit them in your own object. I have no idea of what you are doing that LWP::UserAgent or WWW::Mechanize cannot do or why you would want to "steal, borrow" code from these modules rather than use "use" their code. Perhaps you can explain that some more? This idea of using an ancient thing seems weird to me as well as "steal, borrow". I've been using LWP::UserAgent since Perl 5.6 which was quite a while ago.

      LWP::Debug has long been gutted of any functional code. It is a mere shell so that all of the modules which depend upon it being there do not fail. I am looking for version that contains all of the debug code so that I can leverage it in a Mechanize project. Yes, I can fire up Wireshark but LWP::Debug was useful for its intended purpose.
        I don't know what kind of debugging info that you expect from WWW::Mechanize? I use WireShark and variants to analyze whether I can get a DNS name resolved, etc.

        My internet connect is "fairly reliable", but it will still fail at random unexplainable points - often due to a "barf" at the other end - happens maybe every 3,000 URL's or so. So I just do a re-try which works >99% of the time. Very seldom does one of these things go past one retry and I allow 2 retries.

        Logging massive details of all communications in search of an unrepeatable and rare communication failure between you and site X will not help. What are you going to do with that? Sounds like a lot of logging data that will tie your computer into knots while producing no useful actionable information!

        If there is some kind of a "bad boy" website (slow, unreliable...whatever), logging that is useful. But you will have that info from the normal functions.

        A big mea cupla is in order.

        I misunderstood the comments in the LWP::Debug.pm file as saying the entire module was deprecated. I have implemented the new handlers and they work very well for quick prototyping.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (22)
As of 2014-10-30 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls