Subject: | Somehow, the lack of bareword filehandles causes a -e test to fail |
Date: | Sat, 8 Sep 2018 16:38:49 -0000 |
To: | bug-bareword-filehandles [...] rt.cpan.org |
From: | "Matthew King" <chohag [...] jtan.com> |
bareword::filehandles causes stacked file test operators to fail. perl is
5.26.1.
Script:
BEGIN {
print "First thing:\n";
-d '/' and print "Everything is a directory\n";
-e -d '/' and print "Fine so far\n";
}
use bareword::filehandles;
print "\nWith [out] bareword::filehandles:\n";
-d '/' and print "Everything is a directory\n";
-e -d '/' and print "Can't see me!\n";
no bareword::filehandles;
print "\nWithout bareword::filehandles:\n";
-d '/' and print "Everything is a directory\n";
-e -d '/' and print "Nothing works now\n";
Output:
First thing:
Everything is a directory
Fine so far
With [out] bareword::filehandles:
Everything is a directory
Without bareword::filehandles:
Everything is a directory
Matthew