From 7cfdd6d02d53f581c27a8d1fd8b2e80f99830096 Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 02:31:06 +1200 Subject: [PATCH 1/1] Bug 6679 - [SIGNED-OFF] fix 4 perlcritic violations in C4/Branch.pm Subroutine prototypes used at line 157, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 375, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 385, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 418, column 1. See page 194 of PBP. (Severity: 5) Signed-off-by: Jonathan Druart --- C4/Branch.pm | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Branch.pm b/C4/Branch.pm index 1959a3d..7b0428a 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -154,7 +154,7 @@ sub mybranch { return C4::Context->userenv->{branch} || ''; } -sub GetBranchesLoop (;$$) { # since this is what most pages want anyway +sub GetBranchesLoop { # since this is what most pages want anyway my $branch = @_ ? shift : mybranch(); # optional first argument is branchcode of "my branch", if preselection is wanted. my $onlymine = @_ ? shift : onlymine(); my $branches = GetBranches($onlymine); @@ -372,7 +372,7 @@ the categories were already here, and minimally used. =cut #TODO manage category types. rename possibly to 'agency domains' ? as borrowergroups are called categories. -sub GetCategoryTypes() { +sub GetCategoryTypes { return ( 'searchdomain','properties'); } @@ -382,7 +382,7 @@ $branch = GetBranch( $query, $branches ); =cut -sub GetBranch ($$) { +sub GetBranch { my ( $query, $branches ) = @_; # get branch for this query from branches my $branch = $query->param('branch'); my %cookie = $query->cookie('userenv'); @@ -415,7 +415,7 @@ Returns a href: keys %$branches eq (branchcode,branchname) . =cut -sub GetBranchesInCategory($) { +sub GetBranchesInCategory { my ($categorycode) = @_; my @branches; my $dbh = C4::Context->dbh(); -- 1.7.7.3