Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: How to use LWP::Simpe inside a safe compartment?

by Anonymous Monk
on Dec 07, 2001 at 05:23 UTC ( #130132=note: print w/replies, xml ) Need Help??


in reply to Re: How to use LWP::Simpe inside a safe compartment?
in thread How to use LWP::Simpe inside a safe compartment?

Hi Jim...

Thanks for your try, but I didn't get any result with this code either. What should happen is that "googe.com" should be downloaded and printed out...

I tried:

$safe->share(qw(LWP::Simple::get wget));
but it gives
require trapped by operation mask at C:/Perl/5.00503/lib/IO/Socket.pm +line 9.
which means that LWP::Simple::get tries to load some stuff which is forbidden within the safe compartment.

Nobody any further ideas!?

Best regards,

Christoph Bergmann

Replies are listed 'Best First'.
Re^3: How to use LWP::Simpe inside a safe compartment?
by Anonymous Monk on Aug 01, 2007 at 17:52 UTC
    Take a look at http://perldoc.perl.org/Safe.html. You probably want to do a safe->permit('require').

    I can't say that it will make your program work, but it will get you past that particular error.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://130132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2019-12-05 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (151 votes). Check out past polls.

    Notices?