diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-07-19 09:45:24 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-07-19 09:45:24 +0000 |
commit | f2f96cd564e6a3029bcc2182ffccc4f92f518fb6 (patch) | |
tree | caf8b5abe1c7c84a02606d32a190802119b0f3c5 /pad.c | |
parent | 0f1f2428e1f9e9aa05108acb4c8ec2a0a83d728e (diff) | |
download | perl-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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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), |