RonW has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to use Safe
Strangely, with the ":base_core" ops allowed, numeric constants cause a 'ref-to-glob cast' to be trapped. I am assuming I need to permit another op.
I have made the following test code to demonstrate the problem:
#!perl use strict; use warnings; use Safe; my $box = new Safe; $box->permit_only(':base_core'); my $vi = $box->reval('5',1); die "$@ " unless (defined $vi); print "vi=$vi\n";
Which die'd with the messaged 'ref-to-glob cast' trapped by operation mask at (eval 6) line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What additional ops needed for Safe::reval ?
by stevieb (Canon) on Feb 09, 2017 at 19:56 UTC | |
|
Re: What additional ops needed for Safe::reval ? (why)
by Anonymous Monk on Feb 10, 2017 at 01:52 UTC |