summaryrefslogtreecommitdiff
path: root/t/lib/feature
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2021-12-11 13:14:27 +0000
committerKarl Williamson <khw@cpan.org>2021-12-16 07:56:21 -0700
commit5f5ca502c6f3b230ff3faa1a80c6009715f9970c (patch)
tree64888a4d70bb35e3a6b17a8d4aae0c1a3a978212 /t/lib/feature
parent999b4e2f823bb3637377cedf1548ce7eb27ab6c0 (diff)
downloadperl-5f5ca502c6f3b230ff3faa1a80c6009715f9970c.tar.gz
Also fix paren-less calls of subs where a filehandle could be
If a sub exists, it takes precedence over the filehandle interpretation even without the parens: $ perl -le 'sub foo { "bar" } print foo;' bar
Diffstat (limited to 't/lib/feature')
-rw-r--r--t/lib/feature/bareword_filehandles3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/lib/feature/bareword_filehandles b/t/lib/feature/bareword_filehandles
index 38f8d6530c..a3604770d4 100644
--- a/t/lib/feature/bareword_filehandles
+++ b/t/lib/feature/bareword_filehandles
@@ -490,6 +490,9 @@ use feature "say";
no feature "bareword_filehandles";
sub foo {}
print foo();
+print foo;
say foo();
+say foo;
-x foo();
+-x foo;
EXPECT