From b2651d7b5394f36a27f4301a5d0a4978473e487f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 15 Apr 2014 15:16:42 +0000 Subject: [PATCH] Bug 11797: (follow-up) fix MARC21 branch of bug more idiomatically This patch puts the MARC21 variant of the bugfix in alignment with the UNIMARC variant, removing the use of unnecessary temporary variables. Signed-off-by: Galen Charlton (cherry picked from commit cc7a99ba7f23c7f77bb28c23613fbd9b4ab61cd5) Signed-off-by: Fridolin Somers --- C4/AuthoritiesMarc.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 96083bbca6..8cf9ebcd32 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1034,17 +1034,15 @@ sub BuildSummary { $subfields_to_report = 'vxyz'; } if ($subfields_to_report) { - my $hemain = $field->subfield( substr($subfields_to_report, 0, 1) ); push @authorized, { heading => $field->as_string($subfields_to_report), - hemain => $hemain, + hemain => ( $field->subfield( substr($subfields_to_report, 0, 1) ) // undef ), field => $tag, }; } else { - my $hemain = $field->subfield( 'a' ); push @authorized, { heading => $field->as_string(), - hemain => $hemain, + hemain => ( $field->subfield( 'a' ) // undef ), field => $tag, }; } -- 2.39.5