Port to perl 5.24+

The experimental autoderef feature was cancelled in 5.24.
Use postderef instead which is available (originally also experimental,
but now mainline) since 5.20.
This commit is contained in:
Peter J. Holzer 2019-04-20 00:56:17 +02:00
parent bd73933105
commit bcfae857e0
1 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@ finddup - yet another tool for finding duplicates
=cut
use v5.10;
use v5.20;
no autovivification 'fetch';
use File::Find;
use File::stat;
@ -25,7 +25,7 @@ find(sub {
unless ($haystack->{$size}{$hash}) {
$haystack->{$size}{$hash} = [];
}
push $haystack->{$size}{$hash}, { path => $File::Find::name,
push $haystack->{$size}{$hash}->@*, { path => $File::Find::name,
size => $size,
dev => $st->dev,
ino => $st->ino,
@ -50,7 +50,7 @@ find(
unless ($haystack->{$size}{$hash}) {
$haystack->{$size}{$hash} = [];
}
push $haystack->{$size}{$hash}, $file;
push $haystack->{$size}{$hash}->@*, $file;
}
delete $haystack->{$size}{""};
}