Skip Menu |

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

Report information
The Basics
Id: 76451
Status: new
Priority: 0/
Queue: MARC-Record

Owner: Nobody in particular
Requestors: chris.cooke.ctr [...]

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

Subject: Bug in MARC::Record
Date: Mon, 09 Apr 2012 14:46:55 -0400
To: <bug-MARC-Record [...]>
From: "Chris Cooke, Contractor, Code 5596" <chris.cooke.ctr [...]>
Download (untitled) / with headers
text/plain 677b
There is a bug in MARC::Record when you use the form: my $title = $marc->field('245')->subfield("a"); The problem is that if the field 245 is not defined, then you get a "Can't call method "subfield" on an undefined value at..." error. I have just started to use this module, and noticed this right away on a record with an undefined isbn. This problem does not seem to exist in the form: my $title = $marc->subfield('245', "a"); In my program, $record{$isbn} = $marc->field('20')->subfield('a'); Crashes, but $record{$isbn} = $marc->subfield('20', 'a'); Is fine. The documentation on CPAN states that these two methods are equivalent, but they are not. -Chris

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to