Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Using 'use' away from script start

by jmcnamara (Monsignor)
on Nov 15, 2001 at 13:29 UTC ( [id://125533]=note: print w/replies, xml ) Need Help??


in reply to Using 'use' away from script start


For this type of situation I prefer the autouse pragma:     use autouse 'Some::Module' => 'some_function';

This defers the loading of the module until the function is called.

However, It doesn't seem to work for LWP::Simple::get. I think that this is due to the fact that LWP::Simple defines its own import().

--
John.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2025-03-26 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (68 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.