in reply to Using eval for
for my $plugin (...) { eval 'package Plugin; do $plugin'; # check for $@ here eval { no strict refs; &{'Plugin::func'}() } if ($@) { ...error.handling... } %Plugin:: = () }
The soft reference is required to defeat the compiler's attempt to hold a pointer to *Plugin::func.
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using eval for
by SuperCruncher (Pilgrim) on Dec 28, 2001 at 04:13 UTC | |
by chip (Curate) on Dec 28, 2001 at 04:40 UTC |