From 359f74084fdc155fe0f66da1a7376c1454a64c29 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 5 Oct 2015 10:52:51 +0200 Subject: perlcritic, perltidy --- bin/hashl | 3 ++- lib/App/Hashl.pm | 17 +++++++++++------ 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' ), ); } -- cgit v1.2.3