summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1999-03-03 11:23:56 -0600
committerGurusamy Sarathy <gsar@cpan.org>1999-03-04 05:44:32 +0000
commit39ab52836386b91d2e2c323dd305cf42e6be3133 (patch)
treeecf49e35073401b90b184759b25bd862b04e2bf0 /op.c
parenta6f4eb0a57a2e0009d1bf64dff4f70a26302e92d (diff)
downloadperl-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
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/op.c b/op.c
index fae524eb71..560a50ed2d 100644
--- a/op.c
+++ b/op.c
@@ -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 */