[libcatmandu-marc-perl] 131/208: use MARC::Spec::Parser
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 03:42:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag upstream/1.19
in repository libcatmandu-marc-perl.
commit 1e9bc5f392b13442a3750ff1d1889b57e9c5b957
Author: Carsten Klee <cKlee at users.noreply.github.com>
Date: Fri May 12 12:40:23 2017 +0200
use MARC::Spec::Parser
---
lib/Catmandu/MARC.pm | 4 ++--
t/21-marc-spec.t | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/Catmandu/MARC.pm b/lib/Catmandu/MARC.pm
index 09b062b..032e046 100644
--- a/lib/Catmandu/MARC.pm
+++ b/lib/Catmandu/MARC.pm
@@ -3,7 +3,7 @@ package Catmandu::MARC;
use Catmandu::Sane;
use Catmandu::Util;
use Catmandu::Exporter::MARC::XML;
-use MARC::Spec;
+use MARC::Spec::Parser;
use List::Util;
use Memoize;
use Carp;
@@ -701,7 +701,7 @@ sub _validate_subspec {
sub parse_marc_spec {
my ( $self, $marc_spec ) = @_;
- return MARC::Spec->parse( $marc_spec )
+ return MARC::Spec::Parser->new( $marc_spec )->marcspec
}
sub _get_index_range {
diff --git a/t/21-marc-spec.t b/t/21-marc-spec.t
index dbac380..b8456c2 100644
--- a/t/21-marc-spec.t
+++ b/t/21-marc-spec.t
@@ -15,7 +15,7 @@ ok !defined $records->[0]->{my}{no}{field}, q|fix: marc_spec('000', my.no.field)
#field 666 does not exist in camel.usmarc
#he '$append' fix creates $my->{'references'} hash key with empty array ref as value
-ok !$records->[0]->{'my'}{'references'}, q|fix: marc_map('666', my.references.$append);|;
+ok !$records->[0]->{'my'}{'references'}, q|fix: marc_spec('666', my.references.$append);|;
is_deeply
$records->[0]->{'my'}{'references2'},
@@ -23,7 +23,7 @@ is_deeply
'first',
'IMchF'
],
- q|fix: add_field(my.references2.$first, 'first'); marc_map('003', my.references2.$append);|;
+ q|fix: add_field(my.references2.$first, 'first'); marc_spec('003', my.references2.$append);|;
is $records->[0]->{my}{title}{all}, 'Cross-platform Perl /Eric F. Johnson.', q|fix: marc_spec('245', my.title.all);|;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatmandu-marc-perl.git
More information about the Pkg-perl-cvs-commits
mailing list