Skip Menu |

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

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

People
Owner: GMCHARLT [...] cpan.org
Requestors: chuck.schoppet [...] ars.usda.gov
Cc:
AdminCc:

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



Subject: Misleading error message from MARC::field new
I tried to create a new 245 field with an empty subfield array and got a misleading message: Field 245 must have indicators (use ' ' for empty indicators) at C:\AGRICOLA\245_change_v2.pl line 144 Code: my @subfield_245 = []; my $new_field = MARC::Field->new( '245', '1', '0', @subfields_245 );
From: srdjan [...] catalyst.net.nz
There's a bug in MARC::Field, lines 97-98. It reads: my $indicator = shift; scalar(@_) or croak("..."); Should be: my $indicator = shift or croak("...");
From: srdjan [...] catalyst.net.nz
On Mon May 30 20:31:15 2011, srdjan@catalyst.net.nz wrote: Show quoted text
> There's a bug in MARC::Field, lines 97-98. It reads: > > my $indicator = shift; > scalar(@_) or croak("..."); > > Should be: > my $indicator = shift or croak("...");
Actually taking in account previous submission, it should be my $indicator = shift; defined( $indicator ) or croak("...");
On Mon May 30 20:35:28 2011, srdjan@catalyst.net.nz wrote: Show quoted text
> Actually taking in account previous submission, it should be > > my $indicator = shift; > defined( $indicator ) or croak("...");
Thanks for the report. This is fixed in commit http://sourceforge.net/p/marcpm/code/ci/ab3329244b705b2356c76a45a5d1afd12df41991/, and I will upload a new release to CPAN shortly.
Fixed in 2.0.4.