From 7d4045d48787d5a77a81587f2bcaccfb05f3ff1e Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 6 Jan 2000 00:22:40 +0000 Subject: constant ranges could escape bareword check in list context p4raw-id: //depot/perl@4760 --- t/pragma/strict-subs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 't') diff --git a/t/pragma/strict-subs b/t/pragma/strict-subs index deeb381473..ed4fe7a443 100644 --- a/t/pragma/strict-subs +++ b/t/pragma/strict-subs @@ -32,6 +32,24 @@ Bareword "Fred" 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 = (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 ; -- cgit v1.2.1