iwonbigbro has asked for the wisdom of the Perl Monks concerning the following question:
Within the $body (read from an XML definition) open3 and gensym are used to execute a command. When executing $method:my $method = reval("return sub { $body };");
I get a warning and an exception:&{$method}(...)
I have tried various ways of "use"ing or "require"ing the necessary packages (even creating a wrapper function I call from within the $body). Nothing seems to work and I always get these errors. I can't seem to catch the first "warning".Use of uninitialized value in subroutine entry at (eval 66) line 13. Undefined subroutine & called at (eval 66) line 13.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using open3 within a Safe reval
by tigre (Acolyte) on Feb 25, 2010 at 16:59 UTC |