diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-08-21 16:29:01 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-08-21 16:29:01 +1200 |
commit | f28bc4f5ddf154c019776527392d8e64a77cf50e (patch) | |
tree | c26c803d610f0439f80edeceb9adc3d5c4bc3cd6 | |
parent | Correct ridiculous loop short-circuit error (diff) | |
download | checkem-f28bc4f5ddf154c019776527392d8e64a77cf50e.tar.gz checkem-f28bc4f5ddf154c019776527392d8e64a77cf50e.zip |
Use hex digest for key, duplicate into hashref
-rwxr-xr-x | checkem | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -110,7 +110,8 @@ SIZE: for my $fs ( grep { @{$_} > 1 } values %sizes ) { if ( open my $fh, '<', $f->{name} ) { binmode $fh; $dig->addfile($fh); - push @{ $sums{ $dig->digest() } }, $f; + $f->{hexdigest} = $dig->hexdigest(); + push @{ $sums{ $f->{hexdigest} } }, $f; close $fh or carp 'Failed to close file'; } |