From c6e50e2154d9c10d2aa9f59fcb3602b4de8c4548 Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 01:30:33 +1200 Subject: [PATCH] Bug 6679 - fix 7 perlcritic violations in C4/Biblio.pm Content-Type: text/plain; charset="utf-8" http://koha-community.org - 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) --- C4/Biblio.pm | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 1ab4fff..a6378e6 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -489,10 +489,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; @@ -888,7 +888,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 ); @@ -1145,7 +1145,7 @@ C<$frameworkcode> is the framework code. =cut -sub GetUsedMarcStructure($) { +sub GetUsedMarcStructure { my $frameworkcode = shift || ''; my $query = qq/ SELECT * @@ -1210,7 +1210,7 @@ sub GetMarcBiblio { return $record; } else { - return undef; + return; } } @@ -3452,7 +3452,7 @@ sub _koha_delete_biblio { $sth2->finish; } $sth->finish; - return undef; + return; } =head2 _koha_delete_biblioitems @@ -3501,7 +3501,7 @@ sub _koha_delete_biblioitems { $sth2->finish; } $sth->finish; - return undef; + return; } =head1 UNEXPORTED FUNCTIONS -- 1.7.2.5