Fix warnings with old perl versions
Tomas Doran [Wed, 10 Feb 2010 21:52:03 +0000 (21:52 +0000)]
Changes
lib/Test/NoTabs.pm

diff --git a/Changes b/Changes
index ea583e7..5618fe9 100644 (file)
--- a/Changes
+++ b/Changes
@@ -33,3 +33,6 @@ Revision history for Test-NoTabs
 0.9  2009-087-03
      - Fix default text to make sense, test passing means there are no tabs..
 
+1.0
+     - Fix warnings with old perl versions (5.8.3) RT#54477
+
index 6aa8f3e..76f555a 100644 (file)
@@ -98,7 +98,7 @@ sub _is_perl_script {
     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;