Subject: | `Parentheses missing around "my" list' warning in old Perls |
Using Test::EOL with old perls (certainly up to 5.8.3 but not 5.8.5
onwards) results in warnings about `Parentheses missing around "my" list'.
Attached trivial patch resolves the issue.
Subject: | Test-EOL-0.8-mylist.patch |
--- Test-EOL-0.8/lib/Test/EOL.pm 2010-06-11 00:06:27.000000000 +0100
+++ Test-EOL-0.8/lib/Test/EOL.pm 2010-06-16 09:32:34.449916911 +0100
@@ -151,7 +151,7 @@
my $file = shift;
return 1 if $file =~ /\.pl$/i;
return 1 if $file =~ /\.t$/;
- open my $fh, $file or return;
+ open (my $fh, $file) or return;
my $first = <$fh>;
return 1 if defined $first && ($first =~ $PERL_PATTERN);
return;