Pathologically Eclectic Rubbish Lister | |
PerlMonks |
import doesn't work at runtime?by gdave (Novice) |
on Nov 11, 2011 at 21:36 UTC ( [id://937673]=perlquestion: print w/replies, xml ) | Need Help?? |
gdave has asked for the wisdom of the Perl Monks concerning the following question: so it seems I can only import() from MyModule at compile time ('use' or BEGIN') but not at runtime. Here's my test case: my module (MyModule.pm):
When I call it from a script, this works (meaning I see the output from the print statements):
output is:
and this works (same output)
but this does not (no output)
This seems to me to imply that I can only import at compile time, not at run-time. Am I missing something?
Back to
Seekers of Perl Wisdom
|
|