From 305224b562cb0c1e7acce4d59ba2f13994f5be8b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 24 Jul 2014 15:40:32 -0300 Subject: [PATCH] Bug 12164: (followup) keys expects a hash parameter As of http://perldoc.perl.org/functions/keys.html we should avoid passing a scalar parameter as it is not backwards compatible with squeezze's Perl version (5.10). Cite: "Starting with Perl 5.14, keys can take a scalar EXPR, which must contain a reference to an unblessed hash or array. The argument will be dereferenced automatically. This aspect of keys is considered highly experimental. The exact behaviour may change in a future version of Perl." Signed-off-by: Tomas Cohen Arazi --- C4/Budgets.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index ae6a441..e0e8f72 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -1109,7 +1109,7 @@ sub CloneBudgetHierarchy { my $tidy_budget = { map { join( ' ', @columns ) =~ /$_/ ? ( $_ => $budget->{$_} ) : () } - keys($budget) }; + keys %$budget }; my $new_budget_id = AddBudget( { %$tidy_budget, -- 1.9.1