From 1ea7842b880deb3e60865881af3f5469d1b36d7a Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 01:30:33 +1200 Subject: [PATCH] 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 Signed-off-by: Paul Poulain --- C4/Biblio.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index ab4cc36030..ed8a169e71 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -491,10 +491,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; @@ -890,7 +890,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; } } @@ -3458,7 +3458,7 @@ sub _koha_delete_biblio { $sth2->finish; } $sth->finish; - return undef; + return; } =head2 _koha_delete_biblioitems @@ -3507,7 +3507,7 @@ sub _koha_delete_biblioitems { $sth2->finish; } $sth->finish; - return undef; + return; } =head1 UNEXPORTED FUNCTIONS -- 2.39.5