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+

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Tested batch modification of items, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2014-06-02 11:30:48 -03:00
parent 82e8a7a155
commit 5cfb693a82
1 changed files with 1 additions and 1 deletions

View File

@ -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] );
}