Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Re: Using eval forby SuperCruncher (Pilgrim) |
on Dec 28, 2001 at 04:13 UTC ( [id://134775]=note: print w/replies, xml ) | Need Help?? |
Thanks for your reply. An eval inside an eval... strange. Let me just make sure I've got my head round that code: eval 'package Plugin; do $plugin'; - this creates a package which the 'plugin' is evaled into. eval { no strict refs; &{'Plugin::func'}() } - disables strict refs for the enclosing' block', then calls func in the Plugin package? %Plugin:: = () - I've never seen that before. I didn't know a package could be viewed in a sort of 'hash context'. So that sort of 'resets' the package to undef? BTW, the title of the node should have been "Using eval for 'plugins'" but Everything seems to have removed it in the preview stage (maybe because it didn't escape single quotes properly?).
In Section
Seekers of Perl Wisdom
|
|