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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

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


New User

Feb 24, 2010, 1:11 PM

Post #1 of 1 (1783 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?


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

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