From 759d3ca5c69d55ebcf9a1c79a9b9030e9119069d Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 19 Dec 2014 13:14:19 +0200 Subject: [PATCH] Fix keys/values on reference experimental warnings --- lib/Gruntmaster/Daemon/Format.pm | 2 +- t/01-jobs.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Gruntmaster/Daemon/Format.pm b/lib/Gruntmaster/Daemon/Format.pm index cc5f0f8..146ffb0 100644 --- a/lib/Gruntmaster/Daemon/Format.pm +++ b/lib/Gruntmaster/Daemon/Format.pm @@ -84,7 +84,7 @@ sub prepare{ sub prepare_files{ my $meta = shift; - for my $file (values $meta->{files}) { + for my $file (values %{$meta->{files}}) { my ($format, $name, $content) = @{$file}{qw/format name content/}; $file->{run} = mkrun($format); diff --git a/t/01-jobs.t b/t/01-jobs.t index 1aaea44..7001ef1 100644 --- a/t/01-jobs.t +++ b/t/01-jobs.t @@ -32,7 +32,7 @@ $ENV{PATH}.=':' . cwd; sub check_job{ my $meta = shift; if (defined $meta->{results}) { - delete $meta->{results}[$_]{time} for keys $meta->{results}; + delete $meta->{results}[$_]{time} for keys %{$meta->{results}}; } is $meta->{result}, $meta->{expected_result}, "Result is correct"; is $meta->{result_text}, $meta->{expected_result_text}, "Result text is correct"; @@ -54,7 +54,7 @@ for my $problem (@problems) { $pbmeta->{okfile}[$_ - 1] = read_file "$problem/$_.ok" if $pbmeta->{runner} eq 'File'; } if (exists $pbmeta->{files}) { - $_->{content} = read_file "$problem/$_->{name}" for values $pbmeta->{files} + $_->{content} = read_file "$problem/$_->{name}" for values %{$pbmeta->{files}} } TODO: { -- 2.39.2