Subject: | Use of uninitialized value in concatenation (.) at end of stream |
MARC::File::XML throws a warning error at the end of an XML stream.
E.g. run this script
use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'UNIMARC' );
my $filename = shift;
my $file = MARC::File::XML->in( $filename );
$file->next();
$file->next();
On this file:
<?xml version="1.0" encoding="UTF-8"?>
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<leader> cam a22 3u 4500</leader>
<controlfield tag="001">530000001</controlfield>
</record>
</collection>
The first next() return a record (as it should). The second next() return undef (as it should) but also throws a
Use of uninitialized value in concatenation (.) or string at /opt/lludss-import/local/lib/perl5/MARC/File/XML.pm line 397, <__ANONIO__> chunk 3.