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:
parent
bd73933105
commit
bcfae857e0
14
finddup2
14
finddup2
|
@ -6,7 +6,7 @@ finddup - yet another tool for finding duplicates
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
use v5.10;
|
use v5.20;
|
||||||
no autovivification 'fetch';
|
no autovivification 'fetch';
|
||||||
use File::Find;
|
use File::Find;
|
||||||
use File::stat;
|
use File::stat;
|
||||||
|
@ -25,11 +25,11 @@ find(sub {
|
||||||
unless ($haystack->{$size}{$hash}) {
|
unless ($haystack->{$size}{$hash}) {
|
||||||
$haystack->{$size}{$hash} = [];
|
$haystack->{$size}{$hash} = [];
|
||||||
}
|
}
|
||||||
push $haystack->{$size}{$hash}, { path => $File::Find::name,
|
push $haystack->{$size}{$hash}->@*, { path => $File::Find::name,
|
||||||
size => $size,
|
size => $size,
|
||||||
dev => $st->dev,
|
dev => $st->dev,
|
||||||
ino => $st->ino,
|
ino => $st->ino,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
$haystackdir
|
$haystackdir
|
||||||
|
@ -50,7 +50,7 @@ find(
|
||||||
unless ($haystack->{$size}{$hash}) {
|
unless ($haystack->{$size}{$hash}) {
|
||||||
$haystack->{$size}{$hash} = [];
|
$haystack->{$size}{$hash} = [];
|
||||||
}
|
}
|
||||||
push $haystack->{$size}{$hash}, $file;
|
push $haystack->{$size}{$hash}->@*, $file;
|
||||||
}
|
}
|
||||||
delete $haystack->{$size}{""};
|
delete $haystack->{$size}{""};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue