summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/comp/proto.t
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
committermarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
commit77644ee620b6a79cf8c538abaf7cd301a875528d (patch)
treeb4adabf341898a4378f4b7f8c7fb65f3f7c77769 /contrib/perl5/t/comp/proto.t
parent4fcbc3669aa997848e15198cc9fb856287a6788c (diff)
downloadFreeBSD-src-77644ee620b6a79cf8c538abaf7cd301a875528d.zip
FreeBSD-src-77644ee620b6a79cf8c538abaf7cd301a875528d.tar.gz
Maintenance releace 3 of perl5.005. Includes support for threads.
Diffstat (limited to 'contrib/perl5/t/comp/proto.t')
-rwxr-xr-xcontrib/perl5/t/comp/proto.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/perl5/t/comp/proto.t b/contrib/perl5/t/comp/proto.t
index 6a59107..db6a9b5 100755
--- a/contrib/perl5/t/comp/proto.t
+++ b/contrib/perl5/t/comp/proto.t
@@ -16,7 +16,7 @@ BEGIN {
use strict;
-print "1..82\n";
+print "1..87\n";
my $i = 1;
@@ -413,3 +413,13 @@ sub X::foo4 ($);
*X::foo4 = sub ($) {'ok'};
print "not " unless X->foo4 eq 'ok';
print "ok ", $i++, "\n";
+
+# test if the (*) prototype allows barewords, constants, scalar expressions,
+# globs and globrefs (just as CORE::open() does), all under stricture
+sub star (*&) { &{$_[1]} }
+my $star = 'FOO';
+star FOO, sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
+star "FOO", sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
+star $star, sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
+star *FOO, sub { print "ok $i\n" if $_[0] eq \*FOO }; $i++;
+star \*FOO, sub { print "ok $i\n" if $_[0] eq \*FOO }; $i++;
OpenPOWER on IntegriCloud