Bugzilla – Attachment 29506 Details for
Bug 12482
C4::Budgets : Replacement of subroutine calls of C4::SQLHelper by DBIx::Class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12482: (QA followup) coding guidelines for hashrefs
Bug-12482-QA-followup-coding-guidelines-for-hashre.patch (text/plain), 2.04 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-07-03 18:08:55 UTC
(
hide
)
Description:
Bug 12482: (QA followup) coding guidelines for hashrefs
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-07-03 18:08:55 UTC
Size:
2.04 KB
patch
obsolete
>From a3c9c4b11db62bee5d98624528c524a09a0b93b0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >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 <tomascohen@gmail.com> >--- > admin/aqbudgetperiods.pl | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl >index 6cf7833..d565746 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; >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12482
:
29277
|
29314
|
29457
|
29458
|
29459
| 29506