[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Range Operator error (PR#607)



On Wed, 05 Jan 2000 08:53:26 PST, lou@visca.com wrote:
>Full_Name: Lou Hevly
>Version: 5.005_03
>OS: Win98
>Submission from: (NULL) (62.36.24.11)
>
>
>my @ary = (A .. Z); should give a bareword error. 

This ought to cure it.


Sarathy
gsar@ActiveState.com
-----------------------------------8<-----------------------------------
Change 4760 by gsar@auger on 2000/01/06 00:22:40

	constant ranges could escape bareword check in list context

Affected files ...

... //depot/perl/op.c#231 edit
... //depot/perl/t/pragma/strict-subs#7 edit

Differences ...

==== //depot/perl/op.c#231 (text) ====
Index: perl/op.c
--- perl/op.c.~1~	Wed Jan  5 16:22:45 2000
+++ perl/op.c	Wed Jan  5 16:22:45 2000
@@ -2236,6 +2236,7 @@
 
     PL_op = curop = LINKLIST(o);
     o->op_next = 0;
+    peep(curop);
     pp_pushmark();
     CALLRUNOPS(aTHX);
     PL_op = curop;

==== //depot/perl/t/pragma/strict-subs#7 (text) ====
Index: perl/t/pragma/strict-subs
--- perl/t/pragma/strict-subs.~1~	Wed Jan  5 16:22:45 2000
+++ perl/t/pragma/strict-subs	Wed Jan  5 16:22:45 2000
@@ -33,6 +33,24 @@
 ########
 
 # 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
End of Patch.


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]