summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-07-19 09:45:24 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-07-19 09:45:24 +0000
commitf2f96cd564e6a3029bcc2182ffccc4f92f518fb6 (patch)
treecaf8b5abe1c7c84a02606d32a190802119b0f3c5 /pad.c
parent0f1f2428e1f9e9aa05108acb4c8ec2a0a83d728e (diff)
downloadperl-f2f96cd564e6a3029bcc2182ffccc4f92f518fb6.tar.gz
Overhaul the semantics of the warning
""%s" variable %s masks earlier declaration", based on a patch by Rick Delaney. Now we have : my $x; my $x; # warns my $x; our $x; # warns our $x; my $x; # warns our $x; our $x; # silent p4raw-id: //depot/perl@25179
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pad.c b/pad.c
index 2af57ef9d0..7366c9ae0e 100644
--- a/pad.c
+++ b/pad.c
@@ -515,8 +515,7 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash)
&& sv != &PL_sv_undef
&& !SvFAKE(sv)
&& (SvIVX(sv) == PAD_MAX || SvIVX(sv) == 0)
- && (!is_our
- || ((SvFLAGS(sv) & SVpad_OUR) && GvSTASH(sv) == ourstash))
+ && !(is_our && (SvFLAGS(sv) & SVpad_OUR))
&& strEQ(name, SvPVX_const(sv)))
{
Perl_warner(aTHX_ packWARN(WARN_MISC),