Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by chb (Deacon)
on Dec 07, 2004 at 09:38 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-24 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found