From 5dd8b116b052cf0ced547c618505ca453120c850 Mon Sep 17 00:00:00 2001 From: Mason James Date: Wed, 27 Jun 2012 05:09:58 +1200 Subject: [PATCH 1/1] Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/AuthoritiesMarc.pm "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) Signed-off-by: Jonathan Druart --- C4/AuthoritiesMarc.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index ece46a3..3feac98 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -854,7 +854,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); @@ -1192,7 +1192,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.7.3