aboutsummaryrefslogtreecommitdiff
path: root/checkem
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-08-04 13:52:33 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-08-04 13:53:18 +1200
commit12090e3cdddbc5c6ca9eebc6cdbd27a111c1a633 (patch)
treed9bf956fbf360c0061e23c1334ec95ca59af02e2 /checkem
parentAllow choosing another SHA alg (diff)
downloadcheckem-12090e3cdddbc5c6ca9eebc6cdbd27a111c1a633.tar.gz (sig)
checkem-12090e3cdddbc5c6ca9eebc6cdbd27a111c1a633.zip
Inline digest assignmentv2.3
Diffstat (limited to 'checkem')
-rwxr-xr-xcheckem5
1 files changed, 2 insertions, 3 deletions
diff --git a/checkem b/checkem
index 51c56df..ef77e1c 100755
--- a/checkem
+++ b/checkem
@@ -24,7 +24,7 @@ use Digest::SHA;
use 5.009003;
# Version number to make Perl::Critic happy
-our $VERSION = 2.2;
+our $VERSION = 2.3;
# If no arguments, work with the current working directory
croak('Need at least one dir to search') if !@ARGV;
@@ -83,8 +83,7 @@ FS: for my $fs ( grep { @{$_} > 1 } values %sizes ) {
# Files still the same size and not hard linked, group by digest;
# create the digest object if it isn't already defined
- $dig //= Digest::SHA->new($alg);
- $dig->addfile( $f->{fn} );
+ ( $dig //= Digest::SHA->new($alg) )->addfile( $f->{fn} );
push @{ $sums{ $dig->digest() } }, $f;
}
}