aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-08-04 15:03:54 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-08-04 15:03:54 +1200
commit861f68ca40733ae9c9b7bede77e8024331ee9c79 (patch)
treef187928ac18840c7b017b21799ed51f4f9cbcb9e
parentRemove unneeded loop labels (diff)
downloadcheckem-861f68ca40733ae9c9b7bede77e8024331ee9c79.tar.gz
checkem-861f68ca40733ae9c9b7bede77e8024331ee9c79.zip
Add some more comments
-rwxr-xr-xcheckem8
1 files changed, 8 insertions, 0 deletions
diff --git a/checkem b/checkem
index 9bb708c..2b0599a 100755
--- a/checkem
+++ b/checkem
@@ -51,11 +51,19 @@ find {
no_chdir => 1,
wanted => sub {
my $fn = $File::Find::name;
+
+ # Keep only the stat values we will actually need
my %st;
@st{ keys %STATS } = ( stat $fn )[ values %STATS ]
or return;
+
+ # Check it's a regular file
return if !( $st{mode} & S_IFREG );
+
+ # Check its size is non-zero
return if !$st{size};
+
+ # Push the filename and the stats into this size's bucket
return push @{ $sizes{ $st{size} } },
{
fn => $fn,