r70024 - in /branches/upstream/libmarc-record-perl/current: Changes MANIFEST META.yml Makefile.PL lib/MARC/Field.pm lib/MARC/Record.pm t/68.subfields.t

chrisb at users.alioth.debian.org chrisb at users.alioth.debian.org
Sun Feb 27 22:59:48 UTC 2011


Author: chrisb
Date: Sun Feb 27 22:59:42 2011
New Revision: 70024

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70024
Log:
[svn-upgrade] new version libmarc-record-perl (2.0.3)

Added:
    branches/upstream/libmarc-record-perl/current/t/68.subfields.t
Modified:
    branches/upstream/libmarc-record-perl/current/Changes
    branches/upstream/libmarc-record-perl/current/MANIFEST
    branches/upstream/libmarc-record-perl/current/META.yml
    branches/upstream/libmarc-record-perl/current/Makefile.PL
    branches/upstream/libmarc-record-perl/current/lib/MARC/Field.pm
    branches/upstream/libmarc-record-perl/current/lib/MARC/Record.pm

Modified: branches/upstream/libmarc-record-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/Changes?rev=70024&op=diff
==============================================================================
--- branches/upstream/libmarc-record-perl/current/Changes (original)
+++ branches/upstream/libmarc-record-perl/current/Changes Sun Feb 27 22:59:42 2011
@@ -1,4 +1,11 @@
 Revision history for Perl extension MARC::Record.
+
+2.0.3 Fri Jan 14 17:50:12 EST 2011
+        - RT#62296: fix crash when dealing with record bigger than
+          99999 bytes (Alex Arnaud)
+        - test cases for MARC::Field->subfields()
+        - RT#61198: let subfields return an empty array on control
+          fields (Colin Campbell)
 
 2.0.2 Tue May  4 13:04:07 EDT 2010
         - RT#57180: put back and expanded copyright statement in README

Modified: branches/upstream/libmarc-record-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/MANIFEST?rev=70024&op=diff
==============================================================================
--- branches/upstream/libmarc-record-perl/current/MANIFEST (original)
+++ branches/upstream/libmarc-record-perl/current/MANIFEST Sun Feb 27 22:59:42 2011
@@ -28,6 +28,7 @@
 t/66.grouped.t
 t/66.ordered.t
 t/67.subfield.t
+t/68.subfields.t
 t/70.croak.t
 t/75.warnings.t
 t/80.alphatag.t

Modified: branches/upstream/libmarc-record-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/META.yml?rev=70024&op=diff
==============================================================================
--- branches/upstream/libmarc-record-perl/current/META.yml (original)
+++ branches/upstream/libmarc-record-perl/current/META.yml Sun Feb 27 22:59:42 2011
@@ -1,10 +1,10 @@
 --- #YAML:1.0
 name:               MARC-Record
-version:            2.0.2
+version:            2.0.3
 abstract:           Perl extension for handling MARC records
 author:
     - Galen Charlton <gmcharlt at gmail.com>
-license:            unknown
+license:            perl
 distribution_type:  module
 configure_requires:
     ExtUtils::MakeMaker:  0
@@ -19,7 +19,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.52
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libmarc-record-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/Makefile.PL?rev=70024&op=diff
==============================================================================
--- branches/upstream/libmarc-record-perl/current/Makefile.PL (original)
+++ branches/upstream/libmarc-record-perl/current/Makefile.PL Sun Feb 27 22:59:42 2011
@@ -10,6 +10,7 @@
     ABSTRACT_FROM   => 'lib/MARC/Record.pm',
     PMLIBDIRS       => [ qw( lib/ ) ],
     AUTHOR          => 'Galen Charlton <gmcharlt at gmail.com>',
+    LICENSE         => 'perl',
     PREREQ_PM       => {
         'Test::More' => 0,
         'File::Spec' => 0,

Modified: branches/upstream/libmarc-record-perl/current/lib/MARC/Field.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/lib/MARC/Field.pm?rev=70024&op=diff
==============================================================================
--- branches/upstream/libmarc-record-perl/current/lib/MARC/Field.pm (original)
+++ branches/upstream/libmarc-record-perl/current/lib/MARC/Field.pm Sun Feb 27 22:59:42 2011
@@ -268,8 +268,10 @@
 sub subfields {
     my $self = shift;
 
-    $self->_warn( "Control fields (generally, just tags below 010)  do not have subfields" )
-        if $self->is_control_field;
+    if ($self->is_control_field) {
+        $self->_warn( "Control fields (generally, just tags below 010)  do not have subfields" );
+        return;
+    }
 
     my @list;
     my @data = @{$self->{_subfields}};

Modified: branches/upstream/libmarc-record-perl/current/lib/MARC/Record.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/lib/MARC/Record.pm?rev=70024&op=diff
==============================================================================
--- branches/upstream/libmarc-record-perl/current/lib/MARC/Record.pm (original)
+++ branches/upstream/libmarc-record-perl/current/lib/MARC/Record.pm Sun Feb 27 22:59:42 2011
@@ -12,16 +12,16 @@
 use vars qw( $ERROR );
 
 use MARC::Field;
-use Carp qw(croak);
+use Carp qw(croak carp);
 
 =head1 VERSION
 
-Version 2.0.2
+Version 2.0.3
 
 =cut
 
 use vars qw( $VERSION );
-$VERSION = '2.0.2';
+$VERSION = '2.0.3';
 
 use Exporter;
 use vars qw( @ISA @EXPORTS @EXPORT_OK );

Added: branches/upstream/libmarc-record-perl/current/t/68.subfields.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmarc-record-perl/current/t/68.subfields.t?rev=70024&op=file
==============================================================================
--- branches/upstream/libmarc-record-perl/current/t/68.subfields.t (added)
+++ branches/upstream/libmarc-record-perl/current/t/68.subfields.t Sun Feb 27 22:59:42 2011
@@ -1,0 +1,20 @@
+#!perl -Tw
+
+use Test::More tests => 4; 
+
+use strict;
+
+## make sure that MARC::Field::subfield() is aware of the context 
+## in which it is called. In list context it returns *all* subfields
+## and in scalar just the first.
+
+use_ok( 'MARC::Field' );
+my $field = MARC::Field->new( '245', '', '', a=>'foo', b=>'bar', a=>'baz' );
+isa_ok( $field, 'MARC::Field' );
+
+my @subfields = $field->subfields();
+is_deeply(\@subfields, [ ['a' => 'foo'], ['b' => 'bar'], ['a' => 'baz'] ], 'subfields() returns same subfields');
+
+$field = MARC::Field->new( '000', 'foobar' );
+ at subfields = $field->subfields();
+ok(!@subfields, 'subfields() on a controlfield returns empty array');




More information about the Pkg-perl-cvs-commits mailing list