From: Gurusamy Sarathy Date: Thu, 6 Jan 2000 00:22:40 +0000 (+0000) Subject: constant ranges could escape bareword check in list context X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7d4045d48787d5a77a81587f2bcaccfb05f3ff1e;p=p5sagit%2Fp5-mst-13.2.git constant ranges could escape bareword check in list context p4raw-id: //depot/perl@4760 --- diff --git a/op.c b/op.c index d38a387..0351b0e 100644 --- a/op.c +++ b/op.c @@ -2236,6 +2236,7 @@ Perl_gen_constant_list(pTHX_ register OP *o) PL_op = curop = LINKLIST(o); o->op_next = 0; + peep(curop); pp_pushmark(); CALLRUNOPS(aTHX); PL_op = curop; diff --git a/t/pragma/strict-subs b/t/pragma/strict-subs index deeb381..ed4fe7a 100644 --- a/t/pragma/strict-subs +++ b/t/pragma/strict-subs @@ -33,6 +33,24 @@ Execution of - aborted due to compilation errors. ######## # strict subs - error +use strict 'subs' ; +my @a = (A..Z); +EXPECT +Bareword "Z" not allowed while "strict subs" in use at - line 4. +Bareword "A" not allowed while "strict subs" in use at - line 4. +Execution of - aborted due to compilation errors. +######## + +# strict subs - error +use strict 'subs' ; +my $a = (B..Y); +EXPECT +Bareword "Y" not allowed while "strict subs" in use at - line 4. +Bareword "B" not allowed while "strict subs" in use at - line 4. +Execution of - aborted due to compilation errors. +######## + +# strict subs - error use strict ; Fred ; EXPECT