diff options
-rw-r--r-- | sv.c | 5 | ||||
-rw-r--r-- | t/lib/warnings/op | 2 | ||||
-rw-r--r-- | t/lib/warnings/sv | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -3839,8 +3839,9 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags) { Perl_warner(aTHX_ packWARN(WARN_REDEFINE), CvCONST(cv) - ? "Constant subroutine %s redefined" - : "Subroutine %s redefined", + ? "Constant subroutine %s::%s redefined" + : "Subroutine %s::%s redefined", + HvNAME(GvSTASH((GV*)dstr)), GvENAME((GV*)dstr)); } } diff --git a/t/lib/warnings/op b/t/lib/warnings/op index 7833562273..9b20a8c256 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -775,7 +775,7 @@ no warnings 'redefine' ; sub fred () { 1 } *fred = sub () { 2 }; EXPECT -Constant subroutine fred redefined at - line 4. +Constant subroutine main::fred redefined at - line 4. ######## # op.c use warnings 'redefine' ; diff --git a/t/lib/warnings/sv b/t/lib/warnings/sv index 3903df381f..d9aa827fc8 100644 --- a/t/lib/warnings/sv +++ b/t/lib/warnings/sv @@ -262,7 +262,7 @@ no warnings 'redefine' ; sub jim {} *jim = \&joe ; EXPECT -Subroutine fred redefined at - line 5. +Subroutine main::fred redefined at - line 5. ######## # sv.c use warnings 'printf' ; |