Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Using 'use' away from script start

by MZSanford (Curate)
on Nov 15, 2001 at 09:28 UTC ( [id://125542]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Using 'use' away from script start

All of this, and require goes unloved. :(

In the spirit of KISS, and also guessing that if loading LWP::Simple is too much a performance penalty, i can't imagine Autoloader will be well recieved, i put forward something like this :
sub once_in_a_blue_moon { require LWP::Simple; my $page = get('http://www.yahoo.com'); }

please note, i suggest use'ing the module at the top to improve readability, as i think that will be more important in the long run that the minor gain of not loading LWP::Simple.
i had a memory leak once, and it ruined my favorite shirt.

Replies are listed 'Best First'.
Re: Re: Using 'use' away from script start
by mischief (Hermit) on Nov 15, 2001 at 14:34 UTC
    Have a look at the first reply here, MZSanford, you'll see that require is getting plenty of lovin'.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://125542]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.