Keep It Simple, Stupid | |
PerlMonks |
use vs requireby dash2 (Hermit) |
on Feb 13, 2001 at 22:29 UTC ( [id://58181]=perlquestion: print w/replies, xml ) | Need Help?? |
dash2 has asked for the wisdom of the Perl Monks concerning the following question:
Following on to a previous question I asked, I was wondering: what's the difference between "use" and "require"? I know how they work... no, wait - I think I know how they work - use happens in a little BEGIN block so it's done at compile time, while require happens at run time. But how much difference does this make? Is use twice as fast as require? 10 times? 1000 times? And what makes it faster anyway? Why should compiling something in earlier make it run faster?
Perlpexed,
Back to
Seekers of Perl Wisdom
|
|