Permalink
Browse files

Ignore the return value of read(), which will false in empty files

  • Loading branch information...
1 parent a2c30ea commit 41c8c2e7a714fa99d9919a044f2ff3e439a4db6b @gfx committed Mar 22, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ShipIt/Step/ChangeAllVersions.pm
  2. 0 t/test/script/intentionally_empty
@@ -7,7 +7,7 @@ use warnings;
our $VERSION = '0.004';
use parent qw(ShipIt::Step);
-use Fatal qw(open close rename read opendir closedir);
+use Fatal qw(open close rename opendir closedir);
use File::Find qw(find);
my $looks_like_perl = qr/\. p(?: [ml]c? | od | erl ) \z/xms;
@@ -24,7 +24,7 @@ sub collect_files {
}
else {
open my $in, '<', $_;
- read $in, my($buff), 2;
+ read $in, my($buff), 2; # I don't care whether it fail or not
if($buff && $buff eq '#!'){
push @files, $File::Find::name;
No changes.

0 comments on commit 41c8c2e

Please sign in to comment.