Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Where and when you should place 'use module;'?

by haoess (Curate)
on Oct 12, 2005 at 12:52 UTC ( #499463=note: print w/ replies, xml ) Need Help??


in reply to Where and when you should place 'use module;'?

If your modules where only used sometimes, i. e. not every sub is called always when your program runs, you could require them:

sub only_uses_sometimes { require My::Module; # and call import, if you want some exported things }

Now the module will be loaded at run time.

--Frank


Comment on Re: Where and when you should place 'use module;'?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2015-08-30 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (351 votes), past polls