[libcatmandu-marc-perl] 153/208: Upgrading Catmandu using new group binds for marc_each
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 03:42:46 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 18e6ade68cdcde1d24421f6311d46ba51b23b848
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date: Thu Jun 22 09:46:27 2017 +0200
Upgrading Catmandu using new group binds for marc_each
---
Build.PL | 2 +-
Changes | 2 ++
cpanfile | 2 +-
lib/Catmandu/Fix/Bind/marc_each.pm | 10 +++++-----
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Build.PL b/Build.PL
index 5b53e5f..0da7e6f 100644
--- a/Build.PL
+++ b/Build.PL
@@ -24,7 +24,7 @@ my %module_build_args = (
"recursive_test_files" => 1,
"requires" => {
"Carp" => 0,
- "Catmandu" => "1.0201",
+ "Catmandu" => "1.0601",
"JSON::XS" => "2.3",
"List::Util" => 0,
"MARC::File::MARCMaker" => "0.05",
diff --git a/Changes b/Changes
index 4b1f008..e374573 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
Revision history for Catmandu-MARC
{{$NEXT}}
+ - Upgrading to Catmandu 1.06X
+ - Using the Catmandu::Fix::Bind::Group style for marc_each bind
1.13 2017-06-15 09:19:13 CEST
- Fixing join subfields per field correctly in marc_spec
diff --git a/cpanfile b/cpanfile
index 44fde68..0c3b729 100644
--- a/cpanfile
+++ b/cpanfile
@@ -11,7 +11,7 @@ on 'test', sub {
};
requires 'Carp', '0';
-requires 'Catmandu', '>=1.0201';
+requires 'Catmandu', '>=1.0601';
requires 'JSON::XS', '2.3';
requires 'YAML::XS', '0.34';
requires 'List::Util', '0';
diff --git a/lib/Catmandu/Fix/Bind/marc_each.pm b/lib/Catmandu/Fix/Bind/marc_each.pm
index e4f823a..85a3d82 100644
--- a/lib/Catmandu/Fix/Bind/marc_each.pm
+++ b/lib/Catmandu/Fix/Bind/marc_each.pm
@@ -5,7 +5,7 @@ use Catmandu::Util;
our $VERSION = '1.13';
-with 'Catmandu::Fix::Bind';
+with 'Catmandu::Fix::Bind', 'Catmandu::Fix::Bind::Group';
has done => (is => 'ro');
@@ -13,12 +13,12 @@ sub unit {
my ($self,$data) = @_;
$self->{done} = 0;
-
+
$data;
}
sub bind {
- my ($self,$mvar,$func,$name,$fixer) = @_;
+ my ($self,$mvar,$code) = @_;
return $mvar if $self->done;
@@ -30,7 +30,7 @@ sub bind {
$mvar->{record} = [$row];
- my $fixed = $fixer->fix($mvar);
+ my $fixed = $code->($mvar);
push @new , @{$fixed->{record}} if defined $fixed && exists $fixed->{record} && defined $fixed->{record};
}
@@ -66,7 +66,7 @@ Catmandu::Fix::Bind::marc_each - a binder that loops over MARC fields
=head1 DESCRIPTION
-The marc_each binder will iterate over each individual MARC field and execute the fixes only
+The marc_each binder will iterate over each individual MARC field and execute the fixes only
in context over each individual field.
If a MARC record contains:
--
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