From 54368e169478f7a5e33d1e9b0d3b97152de11a23 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Wed, 10 Jun 2015 15:18:01 +0200 Subject: [PATCH] [Follow up] Bug 13706 - Fix QA failure --- misc/migration_tools/dedup_authorities.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/misc/migration_tools/dedup_authorities.pl b/misc/migration_tools/dedup_authorities.pl index 02a8177..e30c493 100755 --- a/misc/migration_tools/dedup_authorities.pl +++ b/misc/migration_tools/dedup_authorities.pl @@ -12,6 +12,16 @@ use Getopt::Long; use YAML; use List::MoreUtils qw/uniq/; +=head1 NAME + +misc/migration_tools/dedup_authorities.pl - Deduping authorities script + +=head1 DESCRIPTION + +Use this script to remove duplicate authorities. + +=cut + my @matchstrings; my $choosemethod = "u"; # by default, choose to keep the most used authority my ($verbose, $all, $help, $wherestring, $test); @@ -426,13 +436,13 @@ sub _is_duplicate { warn "no or bad authoritytypecode for $authid1"; return 0; } - my $auth_tag = $authtypes{$at1} if (exists $authtypes{$at1}); + my $auth_tag = exists $authtypes{$at1} ? $authtypes{$at1} : ''; my $at2 = GetAuthTypeCode($authid2); if (!$at2){ warn "no or bad authoritytypecode for $authid2"; return 0; } - my $auth_tag2 = $authtypes{$at2} if (exists $authtypes{$at2}); + my $auth_tag2 = exists $authtypes{$at2} ? $authtypes{$at2} : ''; $debug and warn YAML::Dump($authrecord); $debug and warn YAML::Dump($marc); SetUTF8Flag($authrecord); -- 1.7.10.4