in reply to Safe module and undefined subroutines
perl -we 'use Safe; use Safe::Hole; printf("%s, %s\n", $Safe::VERSION, + $Safe::Hole::VERSION); use JSON; my $safe = Safe->new; my $hole = ne +w Safe::Hole {}; sub w() { print "In wrapped w() subroutine.\n"; retu +rn $hole->wrap(JSON->new); } $hole->wrap(\&w, $safe, "&w"); print "Th +is should fail:\n"; $safe->reval("sub x { return \&w; } f(x());"); pr +int "It succeeded\n" unless($@);'
2.35, 0.10 This should fail: In wrapped w() subroutine. Use of uninitialized value $typechar in string eq at /usr/lib64/perl5/ +vendor_perl/Safe/Hole.pm line 121. It succeeded
|
|---|