DIE(aTHX_ PL_no_helem_sv, keysv);
}
if (localizing) {
- if (preeminent)
- save_helem(hv, keysv, svp);
- else {
- STRLEN keylen;
- const char *key = SvPV_const(keysv, keylen);
- SAVEDELETE(hv, savepvn(key,keylen), keylen);
- }
+ if (HvNAME_get(hv) && isGV(*svp))
+ save_gp((GV*)*svp, !(PL_op->op_flags & OPf_SPECIAL));
+ else {
+ if (preeminent)
+ save_helem(hv, keysv, svp);
+ else {
+ STRLEN keylen;
+ const char *key = SvPV_const(keysv, keylen);
+ SAVEDELETE(hv, savepvn(key,keylen), keylen);
+ }
+ }
}
}
*MARK = svp ? *svp : &PL_sv_undef;
::ok(f1() eq "f1", "localised sub restored");
{
local @Other::{qw/ f1 f2 /} = (sub { "j1" }, sub { "j2" });
- local $::TODO = "localisation of stash slice not working";
::ok(f1() eq "j1", "localised sub via stash slice");
::ok(f2() eq "j2", "localised sub via stash slice");
- undef $::TODO;
}
::ok(f1() eq "f1", "localised sub restored");
::ok(f2() eq "f2", "localised sub restored");