
iwonbigbro
New User
Feb 24, 2010, 1:11 PM
Post #1 of 1
(1656 views)
|
Using open3 within a Safe reval
|
Can't Post
|
|
I have used Safe->reval to create a new function:
my $method = reval("return sub { $body };"); Within the $body (read from an XML definition) open3 and gensym are used to execute a command. When executing $method: I get a warning and an exception:
Use of uninitialized value in subroutine entry at (eval 66) line 13. Undefined subroutine & called at (eval 66) line 13. 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". Any ideas?
|