Fix implicit return (PBP)

This commit is contained in:
Dan Church 2023-07-20 12:37:27 -05:00
parent 7dbbb5422a
commit 31fe372e09
Signed by: h3xx
GPG key ID: EA2BF379CD2CDBD0
9 changed files with 14 additions and 10 deletions

View file

@ -15,7 +15,7 @@ sub new {
(@{$self}{qw/ dev ino mode nlink uid gid rdev size
atime mtime ctime blksize blocks /})
= lstat $self->{name};
$self
return $self;
}
sub hash {
@ -26,7 +26,7 @@ sub hash {
$ctx->addfile($self->{name});
$self->{_hash} = $ctx->hexdigest;
}
$self->{_hash}
return $self->{_hash};
}
1;

View file

@ -47,11 +47,12 @@ sub add {
}
$self->{_files_in_hash}->{$file->{name}} = 1;
}
return;
}
sub entries {
my $self = shift;
values %{$self->{_entries}}
return values %{$self->{_entries}};
}
1;

View file

@ -19,6 +19,7 @@ sub run {
my $self = shift;
# preserve older time stamp
utime $self->{source}->{atime}, $self->{source}->{mtime}, $self->{target}->{name};
return;
}
sub bytes_freed {

View file

@ -21,7 +21,7 @@ sub new {
sub as_string {
my $self = shift;
join "\n", $self->instructions;
return join "\n", $self->instructions;
}
sub buckets {
@ -55,7 +55,7 @@ sub buckets {
push @buckets, @these_buckets;
}
@buckets
return @buckets;
}
sub _entry_should_be_skipped {
@ -176,7 +176,7 @@ sub instructions {
);
}
}
@inst
return @inst;
}
1;

View file

@ -31,6 +31,7 @@ sub run {
if (--$self->{target}->{nlink} == 0) {
$self->{freed} = $self->{target}->{size};
}
return;
}
sub bytes_freed {

View file

@ -13,7 +13,7 @@ sub addcommas {
}
push @added, (join '.', @parts);
}
wantarray ? @added : $added[0]
return wantarray ? @added : $added[0];
}
sub hr_size {
@ -32,7 +32,7 @@ sub hr_size {
# default to ($sz, 'bytes')
@ret = ($sz, $sizes[0]) unless @ret;
wantarray ? @ret : "@ret"
return wantarray ? @ret : "@ret";
}
sub shell_quote {
@ -43,7 +43,7 @@ sub shell_quote {
=~ s/'/'\\''/g;
"'$out'";
} @words;
wantarray ? @transformed : $transformed[0];
return wantarray ? @transformed : $transformed[0];
}
1;

View file

@ -121,6 +121,7 @@ sub HELP_MESSAGE {
-verbose => 1,
-exitval => 0,
);
return;
}
MAIN: {

View file

@ -26,4 +26,5 @@ sub put_file {
print $fh 'A';
}
}
return;
}

View file

@ -1,4 +1,3 @@
# vi: et sts=4 sw=4 ts=4
use strict;
use warnings;