aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-29 17:28:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-29 17:28:10 +1200
commitcb437db33ebcf212899cdaba4785366336ff0999 (patch)
tree1a94f1e41ec72cb9710ac6ef426f7aaf049565c1
parentDetect plain file and not symlink correctly (diff)
downloadcheckem-cb437db33ebcf212899cdaba4785366336ff0999.tar.gz
checkem-cb437db33ebcf212899cdaba4785366336ff0999.zip
Remove Carp dependency
-rwxr-xr-xcheckem9
1 files changed, 4 insertions, 5 deletions
diff --git a/checkem b/checkem
index f2f031b..11a56f5 100755
--- a/checkem
+++ b/checkem
@@ -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";
}
}
}