summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-01 15:55:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-01 15:55:55 +0000
commit0e41f3341ddc2d7c1b84cefa47889044ec21b6ff (patch)
treeb6d23c1e76d37acc587a38f4df22b2d2570cef5a /t
parentab1c8f5a409e5da2584190e4e3e5e7734aa56fba (diff)
downloadperl-0e41f3341ddc2d7c1b84cefa47889044ec21b6ff.tar.gz
change#3447 didn't do enough to exempt Foo->bar(qw/.../) from
strict 'subs' p4raw-link: @3447 on //depot/perl: 7a52d87a7fbc7848e6b3e9e96db52d4070212cca p4raw-id: //depot/perl@3514
Diffstat (limited to 't')
-rw-r--r--t/pragma/strict-subs22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/pragma/strict-subs b/t/pragma/strict-subs
index 61ec286eb6..deeb381473 100644
--- a/t/pragma/strict-subs
+++ b/t/pragma/strict-subs
@@ -277,3 +277,25 @@ my $a = Fred ;
EXPECT
Bareword "Fred" not allowed while "strict subs" in use at - line 8.
Execution of - aborted due to compilation errors.
+########
+
+# see if Foo->Bar(...) etc work under strictures
+use strict;
+package Foo; sub Bar { print "@_\n" }
+Foo->Bar('a',1);
+Bar Foo ('b',2);
+Foo->Bar(qw/c 3/);
+Bar Foo (qw/d 4/);
+Foo::->Bar('A',1);
+Bar Foo:: ('B',2);
+Foo::->Bar(qw/C 3/);
+Bar Foo:: (qw/D 4/);
+EXPECT
+Foo a 1
+Foo b 2
+Foo c 3
+Foo d 4
+Foo A 1
+Foo B 2
+Foo C 3
+Foo D 4