Recently, I was presented with a file of MARC 21 (ISO 2709) records
containing indicators of hex 00. When these are decoded by
MARC::Record, they generate error messages, from MARC::Field->new():
Invalid indicator "\x00" forced to blankInvalid indicator "\x00"
forced to blank
If this message had come from MARC::File::USMARC, it would have read
"Invalid indicators \"$indicators\" forced to blanks $location for
tag $tagno\n".
Can the warning message from MARC::Field be updated with the tagno to
help with identifying which field has the problem?
Also, I'm considering revising the marclint program included in bin/
of the MARC::Lint distribution to include any decoding errors
encountered, as seen below. Is there anything I should consider
before doing this, or, would this cause problems for anyone using
marclint?
If this is not a problem, I'll also change the tabs to 4 spaces for
indentation.
(changes indicated with # at the end of the line)
while ( my $marc = $file->next() ) {
if ( not $marc ) {
warn $MARC::Record::ERROR;
++$errors{$filename};
} else {
++$counts{$filename};
}
#store warnings in @warningstoreturn #+
my @warningstoreturn = (); #+
#retrieve any decoding errors #+
#get any warnings from decoding the raw MARC #+
push @warningstoreturn, $marc->warnings(); #+
$linter->check_record( $marc );
#add any warnings from MARC::Lint #+
push @warningstoreturn, $linter->warnings; #+
if ( @warningstoreturn ) { #revised
print join( "\n",
$marc->title,
@warningstoreturn, #revised
"",
"",
);
++$errors{$filename};
}
} # while
##################
Thank you,
Bryan Baldus
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://home.inwave.com/eija