Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: nested Safe->reval and method from custom Module

by gmpassos (Priest)
on Sep 15, 2004 at 17:43 UTC ( #391248=note: print w/replies, xml ) Need Help??


in reply to nested Safe->reval and method from custom Module

The permit() method allow new operators over the already allowed list of operators, so, permit(qw()) does nothing.

If you want to permit all you should use deny_only() without arguments, that will allow everything.

Graciliano M. P.
"Creativity is the expression of the liberty".

  • Comment on Re: nested Safe->reval and method from custom Module

Replies are listed 'Best First'.
Re^2: nested Safe->reval and method from custom Module
by jeremyh (Beadle) on Sep 15, 2004 at 21:45 UTC
    Answered my own question thanks to a hint from samtregar about eval and $@ (on a different thread!).
    It needed
    $compartment->permit( qw( entereval ) );

    the nested eval was trapped by the opcode mask of the first eval.
Re^2: nested Safe->reval and method from custom Module
by jeremyh (Beadle) on Sep 15, 2004 at 18:09 UTC
    Thanks, I discovered that the other day when I was reading the documentation.

    What I had wanted was to deny everything so I guess I want permit_only

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://391248]
help
Chatterbox?
[Corion]: 1nickt: Would be great, especially for naming parameters in @_.
[Corion]: When you pass an arrayref, you get to treat it like a local array. But then, I'm cautious with the experimental features, because just when I thought function signatures were a set thing, there is a proposal to use sub [ $foo, $bar ] { ... } to ...
[Corion]: ... declare the parameters, instead of the more common sub ($foo, $bar) { ... }

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-11-17 20:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?