From 290ec0b7bbbaf3da4d1beeebe76172334357b2ba Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 05:09:58 +1200 Subject: [PATCH] Bug 6679 - fix 2 perlcritic violations in C4/AuthoritiesMarc.pm Content-Type: text/plain; charset="utf-8" http://koha-community.org "return" statement with explicit "undef" at line 853, column 5. See page 199 of PBP. (Severity: 5) "return" statement with explicit "undef" at line 1191, column 3. See page 199 of PBP. (Severity: 5) --- C4/AuthoritiesMarc.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index c92c319..ecb27b1 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -850,7 +850,7 @@ sub GetAuthority { my ($authtypecode, $marcxml) = $sth->fetchrow; my $record=eval {MARC::Record->new_from_xml(StripNonXmlChars($marcxml),'UTF-8', (C4::Context->preference("marcflavour") eq "UNIMARC"?"UNIMARCAUTH":C4::Context->preference("marcflavour")))}; - return undef if ($@); + return if ($@); $record->encoding('UTF-8'); if (C4::Context->preference("marcflavour") eq "MARC21") { my ($auth_type_tag, $auth_type_subfield) = get_auth_type_location($authtypecode); @@ -1188,7 +1188,7 @@ sub BuildUnimarcHierarchy{ my $record = shift @_; my $class = shift @_; my $authid_constructed = shift @_; - return undef unless ($record); + return unless ($record); my $authid=$record->field('001')->data(); my %cell; my $parents=""; my $children=""; -- 1.7.2.5