via glob assignment
p4raw-id: //depot/perl@15789
{
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));
}
}
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' ;
sub jim {}
*jim = \&joe ;
EXPECT
-Subroutine fred redefined at - line 5.
+Subroutine main::fred redefined at - line 5.
########
# sv.c
use warnings 'printf' ;