http://www.perlmonks.org?node_id=391248


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".

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