From e2792cd0ad92c93dc9a241ec4401d1f3aeba2052 Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 01:30:33 +1200 Subject: [PATCH 1/1] Bug 6679 - [SIGNED-OFF] fix 7 perlcritic violations in C4/Biblio.pm - Expression form of "eval" at line 492, column 12. See page 161 of PBP. (Severity: 5) - "return" statement with explicit "undef" at line 891, column 5. See page 199 of PBP. (Severity: 5) - Subroutine prototypes used at line 1148, column 1. See page 194 of PBP. (Severity: 5) Signed-off-by: Jonathan Druart --- C4/Biblio.pm | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index f8ba099..4dea48a 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -490,10 +490,10 @@ sub BiblioAutoLink { my $linker_module = "C4::Linker::" . ( C4::Context->preference("LinkerModule") || 'Default' ); - eval { eval "require $linker_module"; }; + eval { eval {require $linker_module}; }; if ($@) { $linker_module = 'C4::Linker::Default'; - eval "require $linker_module"; + eval {require $linker_module}; } if ($@) { return 0, 0; @@ -889,7 +889,7 @@ Return the ISBD view which can be included in opac and intranet sub GetISBDView { my ( $biblionumber, $template ) = @_; my $record = GetMarcBiblio($biblionumber, 1); - return undef unless defined $record; + return unless defined $record; my $itemtype = &GetFrameworkCode($biblionumber); my ( $holdingbrtagf, $holdingbrtagsubf ) = &GetMarcFromKohaField( "items.holdingbranch", $itemtype ); my $tagslib = &GetMarcStructure( 1, $itemtype ); @@ -1146,7 +1146,7 @@ C<$frameworkcode> is the framework code. =cut -sub GetUsedMarcStructure($) { +sub GetUsedMarcStructure { my $frameworkcode = shift || ''; my $query = qq/ SELECT * @@ -1211,7 +1211,7 @@ sub GetMarcBiblio { return $record; } else { - return undef; + return; } } @@ -3453,7 +3453,7 @@ sub _koha_delete_biblio { $sth2->finish; } $sth->finish; - return undef; + return; } =head2 _koha_delete_biblioitems @@ -3502,7 +3502,7 @@ sub _koha_delete_biblioitems { $sth2->finish; } $sth->finish; - return undef; + return; } =head1 UNEXPORTED FUNCTIONS -- 1.7.7.3