diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-08-04 15:03:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-08-04 15:03:54 +1200 |
commit | 861f68ca40733ae9c9b7bede77e8024331ee9c79 (patch) | |
tree | f187928ac18840c7b017b21799ed51f4f9cbcb9e | |
parent | Remove unneeded loop labels (diff) | |
download | checkem-861f68ca40733ae9c9b7bede77e8024331ee9c79.tar.gz checkem-861f68ca40733ae9c9b7bede77e8024331ee9c79.zip |
Add some more comments
-rwxr-xr-x | checkem | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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, |