From a3c9c4b11db62bee5d98624528c524a09a0b93b0 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 3 Jul 2014 14:36:25 -0300 Subject: [PATCH] Bug 12482: (QA followup) coding guidelines for hashrefs As of the public coding guidelines, $$variable{key} usage is discouraged. $variable->{key} should be used instead. Btw, honour the "FIXME - Bug 2505" line :-D Regards To+ Signed-off-by: Tomas Cohen Arazi --- admin/aqbudgetperiods.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 6cf78332a4..d5657460e1 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -44,9 +44,8 @@ script to administer the budget periods table =cut -## modules -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; + use Number::Format qw(format_price); use CGI; use List::Util qw/min/; @@ -64,7 +63,7 @@ my $dbh = C4::Context->dbh; my $input = new CGI; -my $searchfield = $input->param('searchfield'); +my $searchfield = $input->param('searchfield') // ''; my $budget_period_id = $input->param('budget_period_id'); my $op = $input->param('op')||"else"; #my $sort1_authcat = $input->param('sort1_authcat'); @@ -140,7 +139,7 @@ if ( $op eq 'add_form' ) { } elsif ( $op eq 'add_validate' ) { -## add or modify a budget period (confirimation) +## add or modify a budget period (confirmation) ## update budget period data if ( $budget_period_id ne '' ) { @@ -222,7 +221,7 @@ elsif ( $op eq 'duplicate_budget' ){ # get only the columns of aqbudgets my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns; - my $new_entry = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $$entry{$_} ) : () } keys(%$entry) }; + my $new_entry = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $entry->{$_} ) : () } keys(%$entry) }; # write it to db my $new_id = AddBudget($new_entry); $old_new{$old_id} = $new_id; -- 2.39.5