From 9e00d98d344649fbacd4fdffb9d7c3379dad6a34 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Nov 2014 00:27:52 +0100 Subject: [PATCH] Shut up some Perl 5.20 warnings --- src/lib/Hydra/Controller/User.pm | 2 +- src/lib/Hydra/View/NixExprs.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/User.pm b/src/lib/Hydra/Controller/User.pm index a8f5a82f..21476499 100644 --- a/src/lib/Hydra/Controller/User.pm +++ b/src/lib/Hydra/Controller/User.pm @@ -306,7 +306,7 @@ sub dashboard :Chained('user') :Args(0) { my @builds = $j->job->builds->search( { }, { rows => 20, order_by => "id desc" }); - push $c->stash->{starredJobs}, { job => $j->job, builds => [@builds] }; + push @{$c->stash->{starredJobs}}, { job => $j->job, builds => [@builds] }; } } diff --git a/src/lib/Hydra/View/NixExprs.pm b/src/lib/Hydra/View/NixExprs.pm index 552a7c36..52ef6b2e 100644 --- a/src/lib/Hydra/View/NixExprs.pm +++ b/src/lib/Hydra/View/NixExprs.pm @@ -59,7 +59,7 @@ EOF $res .= "else " if !$first; $res .= "if system == ${\escape $system} then {\n\n"; - foreach my $job (keys $perSystem{$system}) { + foreach my $job (keys %{$perSystem{$system}}) { my $pkg = $perSystem{$system}->{$job}; my $build = $pkg->{build}; $res .= " # Hydra build ${\$build->id}\n"; @@ -78,7 +78,7 @@ EOF if $build->maintainers; $res .= " };\n"; $res .= " } {\n"; - my @outputNames = sort (keys $pkg->{outputs}); + my @outputNames = sort (keys %{$pkg->{outputs}}); $res .= " ${\escape $_} = ${\escape $pkg->{outputs}->{$_}};\n" foreach @outputNames; my $out = defined $pkg->{outputs}->{"out"} ? "out" : $outputNames[0]; $res .= " }).$out;\n\n";