Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by bart (Canon)
on Dec 07, 2004 at 10:28 UTC ( #412877=note: print w/replies, xml ) Need Help??


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

No, you can require+import modules any time you like, even at runtime. use is at compile time.

The reason the latter matters is because modules can change the way the rest of the source is compiled, think of integer, prototyped imported subs, or even plain subs, and constants.

And that will not work at runtime, because it's too late.

  • Comment on Re^4: Difference between 'use' and 'require'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-08-09 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?