|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^2: including modules during runtime and dealing with OS specific (constants) code blockby armstd (Friar) |
| on Aug 02, 2011 at 17:26 UTC ( #918110=note: print w/ replies, xml ) | Need Help?? |
|
First, the functions, SetAttributes and GetAttributes, must be specifically requested: That would not actually make any difference here. The only difference it would make is allowing this syntax:
Instead of this:
...which is not being attempted here. That specification just tells import() what to bring into the current package namespace from the module. The issue in play here is the 'eval', which gives the compiler no idea what will be available at runtime. So it fails at compile time. In your 'fixed' example, it's working not because of your added imports, its working because you removed the 'eval'. --Dave
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||