From 194fb0be75e5d4540f5d20aa4350f55afff2588d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 2 Jun 2014 11:30:48 -0300 Subject: [PATCH] Bug 12151: Remove use of smartmatch operator in tools/batchMod.pl The '~~' smartmatch operator is used to compare MARC::Field->subfield(code) (i.e. a string) and the text element of each MARC::Field->subfields() which is also plain text. Substituting '~~' for 'eq' should be harmless then. Regards To+ --- tools/batchMod.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 41d15cb..bda2eff 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -580,7 +580,7 @@ sub UpdateMarcWith { foreach my $subfield ( $fieldfrom->subfields() ) { foreach my $field_to_update ( @fields_to ) { if ( $subfield->[1] ) { - unless ( $field_to_update->subfield($subfield->[0]) ~~ $subfield->[1] ) { + unless ( $field_to_update->subfield($subfield->[0]) eq $subfield->[1] ) { $modified++; $field_to_update->update( $subfield->[0] => $subfield->[1] ); } -- 1.9.1