in reply to Re: Re: Using eval for
in thread Using eval for
WRT the eval inside the eval: If you don't like that, you can read the file contents and then:
eval 'package Plugin;' . $file_contents
I just did what I did to save the trouble of open/read/close. On the other hand, the eval 'do' will hide your lexical vars from the plugin while the eval above will reveal them. Bug or feature? YOU be the judge.
WRT the packages as hashes: Each element of %pkgname:: is a GLOB. You can do your own glob aliasing that way, and lots of other evil stuff. But beware the bandersnatch, er, beware the compiler's tendency to grab references to GLOBs and not let go even when they've been removed from their original places.
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|