? Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub)
: scalar Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
_clean_stash($root.'::') if $sg != sub_generation();
+ $obj->wrap_code_refs_within(@subret);
return (wantarray) ? @subret : $subret[0];
}
? Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub)
: scalar Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub);
_clean_stash($root.'::') if $sg != sub_generation();
+ $obj->wrap_code_refs_within(@subret);
return (wantarray) ? @subret : $subret[0];
}
is $@, '', 'reval should not fail';
is ref $func, 'CODE', 'reval should return a CODE ref';
-# $func1 will work in non-threaded perl
-# but RT#60374 "Safe.pm sort {} bug with -Dusethreads"
-# means the sorting won't work unless we wrap the code ref
-# such that it's executed with Safe 'in effect' at runtime
-my $func2 = $safe->wrap_code_ref($func1);
-
-my ($l_sorted, $p_sorted) = $func2->(3,1,2);
+my ($l_sorted, $p_sorted) = $func1->(3,1,2);
is $l_sorted, "1,2,3";
is $p_sorted, "1,2,3";