Fix warning in update-dockapps.pl.

In particular, dereference hashes passed to keys function to avoid the following
warnings:
keys on reference is experimental at ./update-dockapps.pl line 91.
keys on reference is experimental at ./update-dockapps.pl line 113.

These warnings appeared after upgrading to Perl 5.20.
This commit is contained in:
Doug Torrance 2014-11-23 06:46:41 -06:00 committed by Carlos R. Mafra
parent 2b788b3e51
commit 4a4d34c424

View file

@ -88,7 +88,7 @@ foreach my $dockapp (keys %dockapps) {
if (grep {$_ eq $dockapp} keys %alts) { if (grep {$_ eq $dockapp} keys %alts) {
next; next;
} }
my $latest_version = (sort by_version keys $dockapps{$dockapp})[-1]; my $latest_version = (sort by_version keys %{$dockapps{$dockapp}})[-1];
if ($r->run("diff", "$dockapp-$latest_version", "HEAD", "--", $dockapp)) { if ($r->run("diff", "$dockapp-$latest_version", "HEAD", "--", $dockapp)) {
my $commit = $r->run("log", "-1", my $commit = $r->run("log", "-1",
"--pretty=format:%H", "--", $dockapp); "--pretty=format:%H", "--", $dockapp);
@ -110,7 +110,7 @@ foreach my $dockapp (keys %dockapps) {
foreach my $dockapp (keys %dockapps) { foreach my $dockapp (keys %dockapps) {
my $versions = ""; my $versions = "";
foreach my $version (reverse sort by_version keys $dockapps{$dockapp}) { foreach my $version (reverse sort by_version keys %{$dockapps{$dockapp}}) {
$versions .= "version-$version = " . $versions .= "version-$version = " .
$dockapps{$dockapp}{$version} . "\n"; $dockapps{$dockapp}{$version} . "\n";
} }