CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Using open3 within a Safe reval

 



iwonbigbro
New User

Feb 24, 2010, 1:11 PM

Post #1 of 1 (684 views)
Using open3 within a Safe reval Can't Post

I have used Safe->reval to create a new function:

Code
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:

Code
&{$method}(...)

I get a warning and an exception:

Code
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?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives