use Safe;
my $sandbox = Safe->new;
I can do this:
$sandbox->reval("$package->new");
$sandbox->reval("$package->new->init");
But I can't figure out how to do this:
my $obj = $sandbox->reval("$package->new");
$sandbox->reval("$obj->init"); # Crunch!
I tried reblessing '$obj' into '$package', but that didn't work. Is what I'm trying to do even possible?
Oh, well. It's enough to start with.
Stumped with Safe 0 Comments More | Login | Reply /