diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-29 17:28:10 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-29 17:28:10 +1200 |
commit | cb437db33ebcf212899cdaba4785366336ff0999 (patch) | |
tree | 1a94f1e41ec72cb9710ac6ef426f7aaf049565c1 | |
parent | Detect plain file and not symlink correctly (diff) | |
download | checkem-cb437db33ebcf212899cdaba4785366336ff0999.tar.gz checkem-cb437db33ebcf212899cdaba4785366336ff0999.zip |
Remove Carp dependency
-rwxr-xr-x | checkem | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -19,7 +19,6 @@ use utf8; use 5.006; # Import modules; Digest is the only one that wasn't in Perl 5.6 core -use Carp; use English '-no_match_vars'; use Fcntl ':mode'; use File::Find; @@ -59,7 +58,7 @@ else { } # Still no digest object, give up -defined $dig or croak 'Could not create a useable Digest object'; +defined $dig or die "Could not create a useable Digest object\n"; # Start a hash of filesizes to file names/stats... my %sizes; @@ -87,7 +86,7 @@ find { # Complain that we couldn't stat else { - carp "Could not stat $f{name}: $ERRNO"; + warn "Could not stat $f{name}: $ERRNO\n"; } # Return if we got to here @@ -119,10 +118,10 @@ SIZE: for my $fs ( grep { @{$_} > 1 } values %sizes ) { $dig->addfile($fh); push @{ $sums{ $f->{hexdigest} = $dig->hexdigest() } }, $f; close $fh - or carp "Could not close $f->{name}: $ERRNO"; + or warn "Could not close $f->{name}: $ERRNO\n"; } else { - carp "Could not open $f->{name}: $ERRNO"; + warn "Could not open $f->{name}: $ERRNO\n"; } } } |