Remove Perl 4 sigils (PBP)

This commit is contained in:
Dan Church 2023-07-20 12:41:07 -05:00
parent 02f97c2a90
commit 907a7113a8
Signed by: h3xx
GPG key ID: EA2BF379CD2CDBD0
12 changed files with 56 additions and 56 deletions

View file

@ -43,7 +43,7 @@ sub add {
$self->{_entries}->{$hash} = [];
}
push @{$self->{_entries}->{$hash}}, $file;
&{$callback}($file) if ref $callback eq 'CODE';
$callback->($file) if ref $callback eq 'CODE';
}
$self->{_files_in_hash}->{$file->{name}} = 1;
}

View file

@ -42,7 +42,7 @@ sub buckets {
next ELIMINATOR if $self->_entry_should_be_skipped($entry);
foreach my $bucket_idx (0 .. $#these_buckets) {
if (&_entries_are_hard_linkable($these_buckets[$bucket_idx]->[0], $entry)) {
if (_entries_are_hard_linkable($these_buckets[$bucket_idx]->[0], $entry)) {
push @{$these_buckets[$bucket_idx]}, $entry;
next ELIMINATOR;
}
@ -71,16 +71,16 @@ sub _entries_are_hard_linkable {
my ($entry_a, $entry_b) = @_;
# obviously, if the sizes aren't the same, they're not the same file
unless (&_entries_sizes_match($entry_a, $entry_b)) {
unless (_entries_sizes_match($entry_a, $entry_b)) {
return 0;
}
# they're the same file, don't try it
if (&_entries_are_already_hard_linked($entry_a, $entry_b)) {
if (_entries_are_already_hard_linked($entry_a, $entry_b)) {
return 0;
}
if (&_entries_contents_match($entry_a, $entry_b)) {
if (_entries_contents_match($entry_a, $entry_b)) {
return 1;
}
return 0;
@ -123,7 +123,7 @@ sub _entries_sizes_match {
sub _entries_contents_match {
my ($entry_a, $entry_b) = @_;
my $contents_same = (0 == &File::Compare::compare($entry_a->{name}, $entry_b->{name}));
my $contents_same = (0 == File::Compare::compare($entry_a->{name}, $entry_b->{name}));
# warn about hash collision
unless ($contents_same) {
@ -168,7 +168,7 @@ sub instructions {
target => $entry,
);
}
if (&Scalar::Util::refaddr($most_linked_entry) != &Scalar::Util::refaddr($oldest_entry)) {
if (Scalar::Util::refaddr($most_linked_entry) != Scalar::Util::refaddr($oldest_entry)) {
# most_linked_entry should get its timestamp updated
push @inst, Directory::Simplify::Instruction::CopyTimestamp->new(
source => $oldest_entry,