summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 726f853f08..5fd6533e43 100644
--- a/sv.c
+++ b/sv.c
@@ -1497,6 +1497,9 @@ Perl_sv_2iv(pTHX_ register SV *sv)
return SvIV(tmpstr);
return PTR2IV(SvRV(sv));
}
+ if (SvREADONLY(sv) && SvFAKE(sv)) {
+ sv_force_normal(sv);
+ }
if (SvREADONLY(sv) && !SvOK(sv)) {
dTHR;
if (ckWARN(WARN_UNINITIALIZED))
@@ -2764,7 +2767,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
Perl_warner(aTHX_ WARN_REDEFINE,
CvCONST(cv)
? "Constant subroutine %s redefined"
- : "Subroutine %s redefined",
+ : "Subroutine %s redefined",
GvENAME((GV*)dstr));
}
}