in reply to How to use LWP::Simpe inside a safe compartment?
First of all let me say that I know nothing about how
Safe.pm works. However, I was able to run your program
without errors with the following change:
This may be inappropriate or not, I don't know, but maybe it helps.$codefromoutside='print wget "http://google.com";'; use LWP::Simple (); sub wget { LWP::Simple::get $_[0] } use Safe; $safe=new Safe; $safe->share(qw(LWP::Simple::get)); ## <- note change here $safe->reval($codefromoutside); print $@ if $@;
--Jim
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: How to use LWP::Simpe inside a safe compartment?
by Anonymous Monk on Dec 07, 2001 at 05:23 UTC | |
by Anonymous Monk on Aug 01, 2007 at 17:52 UTC |
In Section
Seekers of Perl Wisdom