|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
When C<use Module;> *not* the same as C<require Module; import Module;>?by BrowserUk (Patriarch) |
| on Jan 08, 2005 at 10:46 UTC ( [id://420535]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.BrowserUk has asked for the wisdom of the Perl Monks concerning the following question: According to perlfunc, use Module;
I've tried this on several occasions with several different standard/core modules, and it isn't! When I use these modules, they export, by default, some subset of their potential exports, which for the simple case is exactly what I want. When I have need to defer the loading of a module until (and if) it is required--with require--I would like to not have to work out which set of things I going to have to import individually, or even which :tag will give me the default set. If perlfunc was correct, then calling import Module; would do that, but it often (usually?) doesn't. Without getting into the specifics of any particular module, is it possible to explain why this is so, and what can be done about it? Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||