From ec7bd0b2ffa67ea760120dcf55f39af607bdb665 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 13 Sep 2007 18:16:10 +0200 Subject: [PATCH] (unimarc specific) BUGFIX : if 100$a exist but is not 35 char long, MARC::File::XML may fail So, add blanks if needed... Signed-off-by: Chris Cormack --- misc/migration_tools/22_to_30/rebuild_unimarc_100.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl b/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl index 747e91369d..df37b2a976 100755 --- a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl +++ b/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl @@ -35,7 +35,7 @@ sub MARCmodrecord { $update=1; my $string; if ($record->subfield(100,"a")) { - $string = $record->subfield(100,"a"); + $string = substr($record->subfield(100,"a")." ",0,35); my $f100 = $record->field(100); $record->delete_field($f100); } else { -- 2.39.5