summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-10-05 10:52:51 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-10-05 10:52:51 +0200
commit359f74084fdc155fe0f66da1a7376c1454a64c29 (patch)
tree0eca68aec48d03e7c2289519e9f045079d788ca9
parentf81340273fa6d7e87a5b9a032626d69b863cf679 (diff)
perlcritic, perltidy
-rwxr-xr-xbin/hashl3
-rw-r--r--lib/App/Hashl.pm17
2 files changed, 13 insertions, 7 deletions
diff --git a/bin/hashl b/bin/hashl
index 2002973..23286b9 100755
--- a/bin/hashl
+++ b/bin/hashl
@@ -6,7 +6,7 @@ use strict;
use warnings;
use 5.010;
-no if $] >= 5.018, warnings => "experimental::smartmatch";
+no if $] >= 5.018, warnings => 'experimental::smartmatch';
use App::Hashl;
use Cwd;
@@ -127,6 +127,7 @@ sub ensure_equal_hash_sizes {
exit 1;
}
}
+ return;
}
sub copy_file {
diff --git a/lib/App/Hashl.pm b/lib/App/Hashl.pm
index 8cd5f3c..68e8f6e 100644
--- a/lib/App/Hashl.pm
+++ b/lib/App/Hashl.pm
@@ -40,7 +40,7 @@ sub si_size {
my ( $self, $bytes ) = @_;
my @post = ( q{ }, qw(k M G T) );
- if ($bytes == 0) {
+ if ( $bytes == 0 ) {
return 'infinite';
}
@@ -115,11 +115,16 @@ sub db_info {
my ($self) = @_;
return sprintf(
- "Database created by hashl v%s\n" . "Read size: %d bytes (%s)\n" .
- "contains: %d file%s and %d ignored hash%s\n",
- $self->db_version, $self->read_size, $self->si_size( $self->read_size ),
- scalar($self->files), (scalar($self->files) == 1 ? q{} : 's' ),
- scalar($self->ignored), (scalar($self->ignored) == 1 ? q{} : 'es' ),
+ "Database created by hashl v%s\n"
+ . "Read size: %d bytes (%s)\n"
+ . "contains: %d file%s and %d ignored hash%s\n",
+ $self->db_version,
+ $self->read_size,
+ $self->si_size( $self->read_size ),
+ scalar( $self->files ),
+ ( scalar( $self->files ) == 1 ? q{} : 's' ),
+ scalar( $self->ignored ),
+ ( scalar( $self->ignored ) == 1 ? q{} : 'es' ),
);
}