# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #42170]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42170 >


For steve_p on #parrot.

I find this a little too verbose, but would not object if someone  
applied it.

=== t/codingstd/trailing_space.t
==================================================================
--- t/codingstd/trailing_space.t        (revision 4828)
+++ t/codingstd/trailing_space.t        (local)
@@ -50,14 +50,13 @@
      # slurp in the file
      open( my $fh, '<', $path )
          or die "Cannot open '$path' for reading: $!\n";
+
+    while (my $line=<$fh>)
      {
-        local $/;
-        $buf = <$fh>;
+        if ( $line =~ m{.?[ \t]+$} ) {
+            push @failed_files, "$path:$.";
+        }
      }
-
-    if ( $buf =~ m{.?[ \t]+$}m ) {
-        push @failed_files, $path;
-    }
}
# check the file



--
Will "Coke" Coleda
[EMAIL PROTECTED]


Reply via email to