in reply to "use" vs "require"
According to the manual, use is the equivalent of BEGIN { require Module; import Module LIST; } except that Module must be a bareword.
It really comes down to if you wish to import names into your current namespace, so that you would be able to type bar(), and not Foo::bar(). Your project will dictate which is better at the time.
Hope this helped,
-v.
Update: Kudos to friedo for reminding me in his post that there is also the matter of whether you want your code loaded at compile-time vs. runtime.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: "use" vs "require"
by friedo (Prior) on Aug 07, 2006 at 13:14 UTC | |
by Velaki (Chaplain) on Aug 07, 2006 at 13:37 UTC | |
Re^2: "use" vs "require"
by Anonymous Monk on Aug 07, 2006 at 19:43 UTC | |
by ikegami (Patriarch) on Aug 07, 2006 at 20:22 UTC |