From bcfae857e05a051dcec9141c31763863a9dc035d Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 20 Apr 2019 00:56:17 +0200 Subject: [PATCH] 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. --- finddup2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/finddup2 b/finddup2 index 73a2b7a..17fb517 100755 --- a/finddup2 +++ b/finddup2 @@ -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,11 +25,11 @@ find(sub { unless ($haystack->{$size}{$hash}) { $haystack->{$size}{$hash} = []; } - push $haystack->{$size}{$hash}, { path => $File::Find::name, - size => $size, - dev => $st->dev, - ino => $st->ino, - }; + push $haystack->{$size}{$hash}->@*, { path => $File::Find::name, + size => $size, + dev => $st->dev, + ino => $st->ino, + }; } }, $haystackdir @@ -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}{""}; }