in reply to Re: Re: Grabbing a web page without LWP or the like
in thread Grabbing a web page without LWP or the like

Some people are probably tired of hearing "I need to drill a hole but I can't be bothered to install a (free) high-quality commercial drill but rather must install something I build myself which won't be as good at drilling."

I do understand several of the problems with installing modules that lead to the very often repeated requests for how to do things that great modules exist for but without using these great modules. But it doesn't mean that the requests don't get tiring.

The source code for the modules is freely available so if there is some magic about installing the code that you write, then you can use the module source code in order to rewrite the module yourself. But most of us suggest that you figure out how to install some good quality modules along with whatever code you end up writing and installing.

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re: Grabbing a web page without LWP or the like

Replies are listed 'Best First'.
Re: (tye)Re: Grabbing a web page without LWP or the like
by Hot Pastrami (Monk) on Nov 22, 2000 at 02:50 UTC
    This isn't meant to be a "gosh-you're-dumb" response, but I know it will sound that way... I'm not using modules because I am limited to Perl distribution modules, NOT because I "can't be bothered with it." Modules are good, modules are our friends. I know and embrace this fact each day. But they won't work in this scenario, hence the posting. Sorry if I was unspecific, my bad.

    Alan "Hot Pastrami" Bellows
    -Sitting calmly with scissors-
      And I think what he's saying (and I agree) is that 99% of the time, when somebody has a "I am limited to Perl distribution modules" restriction, it's an artificial limitation imposed by people that either don't understand what modules are or just don't understand what's involved in installing them.

      Because, face it, if you have the means to mass-distribute your code, it's trivial to go one step further and mass-distribute modules with it. 99% of the time, this limitation is non-sensical, so people tend to keep repeating, "You're better off finding a way to distribute a pre-existing module that does the work you're wanting to do."

      Look how easily LWP can do this:

      use LWP::Simple; my $content = get("http://www.example.com/some/page");
        True... but that way only saves me 4 lines of code from your previous suggestion (which works very well, by the way), but then adds the 507K worth of LWP's code which I won't be using. If I can do it in 6 lines without LWP, and save myself the inconvenience of explaining to the users how to get the LWP module working, I have succeeded. LWP is more robust, but that's robustness I don't need for this purpose, I need quick and easy.

        Alan "Hot Pastrami" Bellows