Skip Menu |

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

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

People
Owner: GMCHARLT [...] cpan.org
Requestors: julian.maurice [...] biblibre.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.0.3
Fixed in: 2.0.4



Subject: Wrong leader when record length is greater than 99999
If the record length is greater than 99999 bytes, generated leader is invalid since all other informations contained in the leader are shifted to the right. Attached patch force the record length to 99999 to avoid this. Apply with `patch -p0 < patch.txt` at the source root.
Subject: patch.txt
*** lib/MARC/Record.pm 2012-05-04 16:21:03.000000000 +0200 --- lib/MARC/Record2.pm 2012-05-04 16:09:19.000000000 +0200 *************** *** 563,568 **** --- 563,569 ---- my $baseaddr = shift; if ($reclen > 99999) { carp( "Record length of $reclen is larger than the MARC spec allows (99999 bytes)." ); + $reclen = 99999; } substr($self->{_leader},0,5) = sprintf("%05d",$reclen); substr($self->{_leader},12,5) = sprintf("%05d",$baseaddr);
Thanks for the patch. This is fixed in 2.0.4.