Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Difference between 'use' and 'require'

by chb (Deacon)
on Dec 07, 2004 at 09:38 UTC ( #412867=note: print w/replies, xml ) Need Help??


in reply to Re: Difference between 'use' and 'require'
in thread Difference between 'use' and 'require'

Not quite, perldoc -f use says use is equivalent to BEGIN { require Module; import Module LIST; }, meaning it is executed at compile time before everything else. This can bite if your modules depend on some initialisation written in normal code (outside a BEGIN-Block).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-08-10 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?