[libcatmandu-marc-perl] 100/208: Making deprecated code work again
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 03:42:40 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 08db38e83d70a44bc299eeb3a7a14225c7e67d8f
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date: Thu Mar 2 08:27:26 2017 +0100
Making deprecated code work again
---
lib/Catmandu/Fix/Inline/marc_map.pm | 3 +++
t/07-inline-fix.t | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/Catmandu/Fix/Inline/marc_map.pm b/lib/Catmandu/Fix/Inline/marc_map.pm
index 095a1e0..b552e96 100644
--- a/lib/Catmandu/Fix/Inline/marc_map.pm
+++ b/lib/Catmandu/Fix/Inline/marc_map.pm
@@ -79,6 +79,9 @@ sub marc_map {
$data,
$marc_path,
\%opts);
+
+ $vals = $vals->[0] if $opts{'-split'};
+
if (wantarray) {
defined($vals) && ref($vals) eq 'ARRAY' ? @$vals : ($vals);
}
diff --git a/t/07-inline-fix.t b/t/07-inline-fix.t
index 1a95214..b36287f 100644
--- a/t/07-inline-fix.t
+++ b/t/07-inline-fix.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
use Catmandu::Util;
-use Test::More tests => 21;
+use Test::More;
use Catmandu::Fix::Inline::marc_map qw(marc_map);
use Catmandu::Fix::Inline::marc_add qw(marc_add);
@@ -100,3 +100,5 @@ ok(@$records == 2 , "Found 2 records");
my @arr = marc_map($records->[1],'020a',-split=>1);
ok @arr == 2;
}
+
+done_testing;
--
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