RT #130385
The new sv_set_undef() function added by me with v5.25.7-12-ge03e82a
didn't handle undeffing a glob correctly, and gave an assertion failure.
Fix it to behave more exactly like (sv_setsv(sv, &PL_sv_undef),
which it is documented as being identical to.
if (isGV_with_GP(sv))
Perl_ck_warner(aTHX_ packWARN(WARN_MISC),
"Undefined value assigned to typeglob");
-
- SvOK_off(sv);
+ else
+ SvOK_off(sv);
}
# sv.c
use warnings 'misc' ;
*a = undef ;
+(*c) = ();
no warnings 'misc' ;
*b = undef ;
+(*d) = ();
EXPECT
Undefined value assigned to typeglob at - line 3.
+Undefined value assigned to typeglob at - line 4.
########
# sv.c
use warnings 'numeric' ;