diff options
author | Graham Barr <gbarr@pobox.com> | 1999-03-03 11:23:56 -0600 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-04 05:44:32 +0000 |
commit | 39ab52836386b91d2e2c323dd305cf42e6be3133 (patch) | |
tree | ecf49e35073401b90b184759b25bd862b04e2bf0 | |
parent | a6f4eb0a57a2e0009d1bf64dff4f70a26302e92d (diff) | |
download | perl-39ab52836386b91d2e2c323dd305cf42e6be3133.tar.gz |
exempt $foo::a,$foo::b from warnings only if sort() was seen in package foo
Message-ID: <19990303172356.F7442@dal.asp.ti.com>
Subject: Re: 'use strict' doesn't work for one-letter variables
p4raw-id: //depot/perl@3067
-rw-r--r-- | gv.c | 6 | ||||
-rw-r--r-- | op.c | 5 |
2 files changed, 5 insertions, 6 deletions
@@ -621,12 +621,6 @@ gv_fetchpv(const char *nambeg, I32 add, I32 sv_type) IoFLAGS(GvIOn(gv)) |= IOf_ARGV|IOf_START; } break; - - case 'a': - case 'b': - if (len == 1) - GvMULTI_on(gv); - break; case 'E': if (strnEQ(name, "EXPORT", 6)) GvMULTI_on(gv); @@ -5110,6 +5110,11 @@ ck_sort(OP *o) o->op_private |= OPpLOCALE; #endif + if (o->op_type == OP_SORT) { + GvMULTI_on(gv_fetchpv("a", TRUE, SVt_PV)); + GvMULTI_on(gv_fetchpv("b", TRUE, SVt_PV)); + } + if (o->op_flags & OPf_STACKED) simplify_sort(o); if (o->op_flags & OPf_STACKED) { /* may have been cleared */ |