Skip Menu |

This queue is for tickets about the MARC-Record CPAN distribution.

Report information
The Basics
Id: 4474
Status: resolved
Priority: 0/
Queue: MARC-Record

People
Owner: Nobody in particular
Requestors: esummers [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: invalid directory ending causes results in next() to return early
All uses of _warn() in MARC::File::USMARC simply stash away the warning for later retrieval, except for two uses: # character after the directory must be \x1e (substr($text, $data_start-1, 1) eq END_OF_FIELD) or return $marc->_warn( "No directory found $location" ); # all directory entries 12 bytes long, so length % 12 must be 0 (length($dir) % DIRECTORY_ENTRY_LEN == 0) or return $marc->_warn( "Invalid directory length $location" ); Notice how they return? MARC::Record::_warn() stashes away the warning and then returns the MARC::Record object. This means that we end up returning a partial record, instead of motoring on like other other uses of _warn.