diff -Nru libmarc-parser-raw-perl-0.03/Build.PL libmarc-parser-raw-perl-0.06/Build.PL --- libmarc-parser-raw-perl-0.03/Build.PL 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/Build.PL 2018-02-14 17:17:09.000000000 +0000 @@ -1,4 +1,7 @@ -# This Build.PL for MARC-Parser-RAW was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.006. +# This Build.PL for MARC-Parser-RAW was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.015. +use strict; +use warnings; + use 5.006; -use Module::Build::Tiny 0.039; +use Module::Build::Tiny 0.034; Build_PL(); diff -Nru libmarc-parser-raw-perl-0.03/Changes libmarc-parser-raw-perl-0.06/Changes --- libmarc-parser-raw-perl-0.03/Changes 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/Changes 2018-02-14 17:17:09.000000000 +0000 @@ -1,5 +1,17 @@ Changelog for MARC-Parser-RAW +0.06 2018-02-14 18:17:06 CET + - fix tidyall + - add new Perl versions to travis + +0.05 2016-09-01 14:47:54 CEST + - fix merge + +0.04 2016-09-01 09:45:13 CEST + - support for scalar references with MARC data + - tidy + - use Perl::Tidy and Perl::Critic + 0.03 2015-06-16 18:12:52 CEST - edit cpanfile - fix typo in POD @@ -14,4 +26,4 @@ 0.01 2014-05-28 - initial commit - \ No newline at end of file + diff -Nru libmarc-parser-raw-perl-0.03/cpanfile libmarc-parser-raw-perl-0.06/cpanfile --- libmarc-parser-raw-perl-0.03/cpanfile 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/cpanfile 2018-02-14 17:17:09.000000000 +0000 @@ -1,5 +1,13 @@ -requires 'Readonly', '>= 1.0'; - -on test => sub { - requires 'Test::More', '0.96'; +requires 'Readonly', '>= 1.0'; + +on 'develop', sub { + requires 'Code::TidyAll', 0; + requires 'Perl::Tidy', 0; + requires 'Test::Code::TidyAll', '0.20'; + requires 'Text::Diff', 0; # undeclared Test::Code::TidyAll plugin dependency + requires 'Test::Perl::Critic'; +}; + +on test => sub { + requires 'Test::More'; }; \ No newline at end of file diff -Nru libmarc-parser-raw-perl-0.03/debian/changelog libmarc-parser-raw-perl-0.06/debian/changelog --- libmarc-parser-raw-perl-0.03/debian/changelog 2015-08-04 11:53:39.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/changelog 2019-02-20 12:30:38.000000000 +0000 @@ -1,3 +1,38 @@ +libmarc-parser-raw-perl (0.06-1) unstable; urgency=medium + + [ upstream ] + * New release(s). + + [ Salvatore Bonaccorso ] + * Update Vcs-* headers for switch to salsa.debian.org. + + [ gregor herrmann ] + * Update URLs from {search,www}.cpan.org to MetaCPAN. + * Update GitHub URLs to use HTTPS. + + [ Jonas Smedegaard ] + * Simplify rules. + Stop build-depend on devscripts cdbs. + * Update git-buildpackage config: Filter any .git* file. + * Stop build-depend on dh-buildinfo. + * Mark build-dependencies needed only for testsuite as such. + * Declare compliance with Debian Policy 4.3.0. + * Enable autopkgtest. + * Set Rules-Requires-Root: no. + * Wrap and sort control file. + * Update copyright info: + + Use https protocol in Format URL. + + Extend coverage of packaging. + * Drop obsolete lintian override regarding debhelper 9. + * Tighten lintian overrides regarding License-Reference. + * Update watch file: + + Bump to file format 4. + + Track only MetaCPAN URL. + + Rewrite usage comment. + + Use substitution strings. + + -- Jonas Smedegaard Wed, 20 Feb 2019 13:30:38 +0100 + libmarc-parser-raw-perl (0.03-1) unstable; urgency=medium [ upstream ] diff -Nru libmarc-parser-raw-perl-0.03/debian/control libmarc-parser-raw-perl-0.06/debian/control --- libmarc-parser-raw-perl-0.03/debian/control 2015-08-04 11:51:59.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/control 2019-02-20 12:30:38.000000000 +0000 @@ -1,28 +1,34 @@ Source: libmarc-parser-raw-perl Section: perl Priority: optional -Build-Depends: cdbs (>= 0.4.122~), - devscripts, - perl, - libmodule-build-tiny-perl, +Build-Depends: debhelper, - dh-buildinfo, - libreadonly-perl + libmodule-build-tiny-perl, + libreadonly-perl , + perl, Maintainer: Debian Perl Group -Uploaders: Jonas Smedegaard -Standards-Version: 3.9.6 -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libmarc-parser-raw-perl -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libmarc-parser-raw-perl.git +Uploaders: + Jonas Smedegaard , +Standards-Version: 4.3.0 +Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libmarc-parser-raw-perl.git +Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libmarc-parser-raw-perl Homepage: https://github.com/jorol/MARC-Parser-RAW +Testsuite: autopkgtest-pkg-perl +Rules-Requires-Root: no Package: libmarc-parser-raw-perl Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, ${cdbs:Depends} -Enhances: ${cdbs:Enhances} +Depends: + libreadonly-perl, + ${misc:Depends}, + ${perl:Depends}, Description: parser for ISO 2709 encoded MARC records - MARC::Parser::RAW is a lightweight, fault tolerant parser for ISO 2709 - encoded MARC records. Tags, indicators and subfield codes are not - validated against the MARC standard. Record length from leader and - field lengths from the directory are ignored. Records with a faulty - structure will be skipped with a warning. The resulting data structure - is optimized for usage with the Catmandu data toolkit. + MARC::Parser::RAW is a lightweight, fault tolerant parser + for ISO 2709 encoded MARC records. + Tags, indicators and subfield codes are not validated + against the MARC standard. + Record length from leader and field lengths from the directory + are ignored. + Records with a faulty structure will be skipped with a warning. + The resulting data structure is optimized + for usage with the Catmandu data toolkit. diff -Nru libmarc-parser-raw-perl-0.03/debian/control.in libmarc-parser-raw-perl-0.06/debian/control.in --- libmarc-parser-raw-perl-0.03/debian/control.in 2015-08-04 11:50:44.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/control.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -Source: libmarc-parser-raw-perl -Section: perl -Priority: optional -Build-Depends: @cdbs@ -Maintainer: Debian Perl Group -Uploaders: Jonas Smedegaard -Standards-Version: 3.9.6 -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libmarc-parser-raw-perl -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libmarc-parser-raw-perl.git -Homepage: https://github.com/jorol/MARC-Parser-RAW - -Package: libmarc-parser-raw-perl -Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, ${cdbs:Depends} -Enhances: ${cdbs:Enhances} -Description: parser for ISO 2709 encoded MARC records - MARC::Parser::RAW is a lightweight, fault tolerant parser for ISO 2709 - encoded MARC records. Tags, indicators and subfield codes are not - validated against the MARC standard. Record length from leader and - field lengths from the directory are ignored. Records with a faulty - structure will be skipped with a warning. The resulting data structure - is optimized for usage with the Catmandu data toolkit. diff -Nru libmarc-parser-raw-perl-0.03/debian/copyright libmarc-parser-raw-perl-0.06/debian/copyright --- libmarc-parser-raw-perl-0.03/debian/copyright 2015-08-04 11:36:47.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/copyright 2019-02-20 12:27:08.000000000 +0000 @@ -1,26 +1,28 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: MARC::Parser::RAW Upstream-Contact: https://github.com/jorol/MARC-Parser-RAW/issues Source: https://github.com/jorol/MARC-Parser-RAW - git://github.com/jorol/MARC-Parser-RAW + https://github.com/jorol/MARC-Parser-RAW Files: * Copyright: 2014, Johann Rolschewski License-Grant: - This is free software; you can redistribute it and/or modify it under - the same terms as the Perl 5 programming language system itself. + This is free software; + you can redistribute it and/or modify it + under the same terms as the Perl 5 programming language system itself. License: Artistic or GPL-1+ Comment: - Perl 5 is licensed under either the 'Artistic license' or the 'GNU - General Public License' version 1 or later. + Perl 5 is licensed under either the Artistic license + or the GNU General Public License version 1 or later. Files: debian/* -Copyright: 2014-2015, Jonas Smedegaard +Copyright: 2014-2019, Jonas Smedegaard License-Grant: - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3, or (at your option) any - later version. + This program is free software; + you can redistribute it and/or modify it + under the terms of the GNU General Public License + as published by the Free Software Foundation, + either version 3, or (at your option) any later version. License: GPL-3+ License: Artistic diff -Nru libmarc-parser-raw-perl-0.03/debian/copyright-check libmarc-parser-raw-perl-0.06/debian/copyright-check --- libmarc-parser-raw-perl-0.03/debian/copyright-check 1970-01-01 00:00:00.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/copyright-check 2019-02-04 01:46:59.000000000 +0000 @@ -0,0 +1,29 @@ +#!/bin/sh +# Copyright 2016-2019, Jonas Smedegaard +# Description: helper script to update copyright_hints +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set -eu + +# extract metadata from graphics files before copyright check +# - and skip data files unlikely to contain copyright/licensing info. +export DEB_COPYRIGHT_EXTRACT_EXTS="gif jpg png" +export DEB_COPYRIGHT_CHECK_IGNORE_EXTS="epgz ico" + +make -f /usr/share/cdbs/1/rules/utils.mk pre-build || true +make -f /usr/share/cdbs/1/rules/utils.mk clean DEB_COPYRIGHT_CHECK_STRICT=1 + +# unconditionally merge changes - safe to do with git-tracked package +[ ! -f debian/copyright_newhints ] || mv -f debian/copyright_newhints debian/copyright_hints diff -Nru libmarc-parser-raw-perl-0.03/debian/copyright_hints libmarc-parser-raw-perl-0.06/debian/copyright_hints --- libmarc-parser-raw-perl-0.03/debian/copyright_hints 2015-08-04 11:51:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/copyright_hints 2019-02-20 12:30:38.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: FIXME Upstream-Contact: FIXME Source: FIXME @@ -10,41 +10,59 @@ META.json META.yml cpanfile - debian/README.source debian/compat debian/control - debian/control.in + debian/docs debian/gbp.conf + debian/rules debian/source/format - debian/source/lintian-overrides debian/watch dist.ini t/00-load.t t/01-parser.t + t/author-pod-syntax.t t/camel.mrc - t/release-pod-syntax.t -Copyright: *No copyright* + t/release-tidyall.t +Copyright: NONE License: UNKNOWN FIXME +Files: LICENSE +Copyright: 1989, Free Software Foundation, Inc. + 19xx name of author + 19yy + 2014, - by Johann Rolschewski . + disclaimer" for the program, if + ed by the Free + interest in the + of this Package, but belong to whomever generated them, and may be sold + the software, and +License: Artistic or GPL-1+ + FIXME + Files: README - lib/MARC/Parser/RAW.pm -Copyright: 2014- Johann Rolschewski -License: UNKNOWN +Copyright: Copyright 2014- Johann Rolschewski +License: Artistic or GPL-1+ FIXME -Files: debian/rules -Copyright: 2014-2015, Jonas Smedegaard +Files: lib/MARC/Parser/RAW.pm +Copyright: Copyright 2014- Johann Rolschewski / +License: Artistic or GPL-1+ + FIXME + +Files: debian/copyright-check +Copyright: 2016-2019, Jonas Smedegaard + check License: GPL-3+ FIXME -Files: LICENSE -Copyright: 1989, Free Software Foundation, Inc - 19xx name of author - 19yy - 2014- Johann Rolschewski - disclaimer" for the program, if - the software, and -License: GPL-ever +Files: debian/source/lintian-overrides +Copyright: Artistic + GPL-1+ + GPL-3+ + artistic + gpl-1+ + gpl-3+ +License: UNKNOWN FIXME diff -Nru libmarc-parser-raw-perl-0.03/debian/docs libmarc-parser-raw-perl-0.06/debian/docs --- libmarc-parser-raw-perl-0.03/debian/docs 1970-01-01 00:00:00.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/docs 2019-02-20 12:30:38.000000000 +0000 @@ -0,0 +1 @@ +README diff -Nru libmarc-parser-raw-perl-0.03/debian/gbp.conf libmarc-parser-raw-perl-0.06/debian/gbp.conf --- libmarc-parser-raw-perl-0.03/debian/gbp.conf 2015-08-04 11:36:43.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/gbp.conf 2019-02-18 22:13:40.000000000 +0000 @@ -3,4 +3,4 @@ [DEFAULT] pristine-tar = True sign-tags = True -filter = .gitignore +filter = */.git* diff -Nru libmarc-parser-raw-perl-0.03/debian/README.source libmarc-parser-raw-perl-0.06/debian/README.source --- libmarc-parser-raw-perl-0.03/debian/README.source 2014-05-17 09:14:24.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/README.source 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -CDBS+git-buildpackage ---------------------- - -This source package uses CDBS and git-buildpackage. NMUs need not (but -are encouraged to) make special use of these tools. In particular, the -debian/control.in file can be completely ignored. - -More info here: http://wiki.debian.org/CDBS+git-buildpackage - - - -- Jonas Smedegaard Mon, 18 Feb 2013 12:55:37 +0100 diff -Nru libmarc-parser-raw-perl-0.03/debian/rules libmarc-parser-raw-perl-0.06/debian/rules --- libmarc-parser-raw-perl-0.03/debian/rules 2015-08-04 11:45:08.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/rules 2019-02-07 01:17:13.000000000 +0000 @@ -1,37 +1,4 @@ #!/usr/bin/make -f -# -*- mode: makefile; coding: utf-8 -*- -# Copyright © 2014-2015 Jonas Smedegaard -# Description: Main Debian packaging script for MARC::Parser::RAW -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -include /usr/share/cdbs/1/rules/upstream-tarball.mk -include /usr/share/cdbs/1/rules/utils.mk -include /usr/share/cdbs/1/class/perl-build.mk -include /usr/share/cdbs/1/rules/debhelper.mk - -pkg = $(DEB_SOURCE_PACKAGE) - -DEB_UPSTREAM_PACKAGE = MARC-Parser-RAW -DEB_UPSTREAM_URL = http://www.cpan.org/authors/id/J/JO/JOROL - -# Build-depend unversioned on debhelper -# TODO: Drop when adopted in cdbs -CDBS_BUILD_DEPENDS_rules_debhelper_v9 = debhelper - -# Needed by upstream build and (always) at runtime -deps = libreadonly-perl - -CDBS_BUILD_DEPENDS +=, $(deps) -CDBS_DEPENDS_$(pkg) = $(deps) +%: + dh $@ diff -Nru libmarc-parser-raw-perl-0.03/debian/source/lintian-overrides libmarc-parser-raw-perl-0.06/debian/source/lintian-overrides --- libmarc-parser-raw-perl-0.03/debian/source/lintian-overrides 2015-08-03 15:02:15.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/source/lintian-overrides 2019-02-07 01:17:13.000000000 +0000 @@ -1,8 +1,7 @@ # License is in License-Reference field (see bug#786450) -missing-license-text-in-dep5-copyright - -# License is in License-Reference field (see bug#786450) -missing-license-paragraph-in-dep5-copyright - -# Debhelper 9 is satisfied even in oldstable -package-needs-versioned-debhelper-build-depends 9 +missing-license-paragraph-in-dep5-copyright artistic * +missing-license-paragraph-in-dep5-copyright gpl-1\+ * +missing-license-paragraph-in-dep5-copyright gpl-3\+ * +missing-license-text-in-dep5-copyright Artistic * +missing-license-text-in-dep5-copyright GPL-1\+ * +missing-license-text-in-dep5-copyright GPL-3\+ * diff -Nru libmarc-parser-raw-perl-0.03/debian/watch libmarc-parser-raw-perl-0.06/debian/watch --- libmarc-parser-raw-perl-0.03/debian/watch 2014-10-21 15:24:29.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/debian/watch 2019-02-20 12:28:33.000000000 +0000 @@ -1,4 +1,6 @@ -# Run the "uscan" command to check for upstream updates and more. -version=3 -http://www.cpan.org/authors/id/J/JO/JOROL/MARC-Parser-RAW-([\d.]+)\.tar\.gz -https://metacpan.org/release/MARC-Parser-RAW .*/MARC-Parser-RAW-([\d.]+)\.tar\.gz +version=4 +# check: uscan --report +# update: gbp import-orig --upstream-vcs-tag=vX.Y.Z --uscan + +https://metacpan.org/release/MARC-Parser-RAW \ +.*/MARC-Parser-RAW@ANY_VERSION@@ARCHIVE_EXT@ diff -Nru libmarc-parser-raw-perl-0.03/dist.ini libmarc-parser-raw-perl-0.06/dist.ini --- libmarc-parser-raw-perl-0.03/dist.ini 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/dist.ini 2018-02-14 17:17:09.000000000 +0000 @@ -1,4 +1,4 @@ -name = MARC-Parser-RAW -author = Johann Rolschewski - -[@Milla] +name = MARC-Parser-RAW +author = Johann Rolschewski + +[@Milla] diff -Nru libmarc-parser-raw-perl-0.03/lib/MARC/Parser/RAW.pm libmarc-parser-raw-perl-0.06/lib/MARC/Parser/RAW.pm --- libmarc-parser-raw-perl-0.03/lib/MARC/Parser/RAW.pm 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/lib/MARC/Parser/RAW.pm 2018-02-14 17:17:09.000000000 +0000 @@ -1,9 +1,11 @@ package MARC::Parser::RAW; -our $VERSION = "0.03"; - use strict; use warnings; +use utf8; + +our $VERSION = "0.06"; + use charnames qw< :full >; use Carp qw(croak carp); use Encode qw(find_encoding); @@ -66,7 +68,7 @@ =head1 METHODS -=head2 new($file|$fh [, $encoding]) +=head2 new($file|$fh|$scalarref [, $encoding]) =head3 Configuration @@ -80,6 +82,10 @@ Open filehandle for raw MARC records. +=item C + +Reference to scalar with raw MARC records. + =item C Set encoding. Default: UTF-8. Optional. @@ -105,12 +111,13 @@ }; # check for file or filehandle + # ToDo: check for scalar ref my $ishandle = eval { fileno($file); }; if ( !$@ && defined $ishandle ) { $self->{file} = scalar $file; $self->{fh} = $file; } - elsif ( -e $file ) { + elsif ( -e $file || ref($file) eq 'SCALAR' ) { open $self->{fh}, "<:encoding($self->{encoding})", $file or croak "cannot read from file $file\n"; $self->{file} = $file; @@ -131,7 +138,7 @@ my $self = shift; my $fh = $self->{fh}; local $INPUT_RECORD_SEPARATOR = $END_OF_RECORD; - if ( defined (my $raw = <$fh>) ) { + if ( defined( my $raw = <$fh> ) ) { $self->{rec_number}++; # remove illegal garbage that sometimes occurs between records @@ -139,7 +146,6 @@ =~ s/^[\N{SPACE}\N{NUL}\N{LINE FEED}\N{CARRIAGE RETURN}\N{SUB}]+//; return unless $raw; - if ( my $marc = $self->_decode($raw) ) { return $marc; } diff -Nru libmarc-parser-raw-perl-0.03/MANIFEST libmarc-parser-raw-perl-0.06/MANIFEST --- libmarc-parser-raw-perl-0.03/MANIFEST 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/MANIFEST 2018-02-14 17:17:09.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.036. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.008. Build.PL Changes LICENSE @@ -11,5 +11,6 @@ lib/MARC/Parser/RAW.pm t/00-load.t t/01-parser.t +t/author-pod-syntax.t t/camel.mrc -t/release-pod-syntax.t +t/release-tidyall.t diff -Nru libmarc-parser-raw-perl-0.03/META.json libmarc-parser-raw-perl-0.06/META.json --- libmarc-parser-raw-perl-0.03/META.json 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/META.json 2018-02-14 17:17:09.000000000 +0000 @@ -4,35 +4,40 @@ "Johann Rolschewski " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 5.036, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150001", + "generated_by" : "Dist::Milla version v1.0.17, Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "MARC-Parser-RAW", "no_index" : { "directory" : [ - "t", - "xt", + "eg", + "examples", "inc", "share", - "eg", - "examples" + "t", + "xt" ] }, "prereqs" : { "configure" : { "requires" : { - "Module::Build::Tiny" : "0.039" + "Module::Build::Tiny" : "0.034" } }, "develop" : { "requires" : { - "Dist::Milla" : "v1.0.15", - "Test::Pod" : "1.41" + "Code::TidyAll" : "0", + "Dist::Milla" : "v1.0.17", + "Perl::Tidy" : "0", + "Test::Code::TidyAll" : "0.20", + "Test::Perl::Critic" : "0", + "Test::Pod" : "1.41", + "Text::Diff" : "0" } }, "runtime" : { @@ -42,7 +47,7 @@ }, "test" : { "requires" : { - "Test::More" : "0.96" + "Test::More" : "0" } } }, @@ -58,9 +63,10 @@ "web" : "https://github.com/jorol/MARC-Parser-RAW" } }, - "version" : "0.03", + "version" : "0.06", "x_contributors" : [ "Johann Rolschewski " - ] + ], + "x_serialization_backend" : "Cpanel::JSON::XS version 4.00" } diff -Nru libmarc-parser-raw-perl-0.03/META.yml libmarc-parser-raw-perl-0.06/META.yml --- libmarc-parser-raw-perl-0.03/META.yml 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/META.yml 2018-02-14 17:17:09.000000000 +0000 @@ -3,11 +3,11 @@ author: - 'Johann Rolschewski ' build_requires: - Test::More: '0.96' + Test::More: '0' configure_requires: - Module::Build::Tiny: '0.039' + Module::Build::Tiny: '0.034' dynamic_config: 0 -generated_by: 'Dist::Zilla version 5.036, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150001' +generated_by: 'Dist::Milla version v1.0.17, Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -15,18 +15,19 @@ name: MARC-Parser-RAW no_index: directory: - - t - - xt - - inc - - share - eg - examples + - inc + - share + - t + - xt requires: Readonly: '1.0' resources: bugtracker: https://github.com/jorol/MARC-Parser-RAW/issues homepage: https://github.com/jorol/MARC-Parser-RAW repository: https://github.com/jorol/MARC-Parser-RAW.git -version: '0.03' +version: '0.06' x_contributors: - 'Johann Rolschewski ' +x_serialization_backend: 'YAML::Tiny version 1.69' diff -Nru libmarc-parser-raw-perl-0.03/README libmarc-parser-raw-perl-0.06/README --- libmarc-parser-raw-perl-0.03/README 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/README 2018-02-14 17:17:09.000000000 +0000 @@ -1,27 +1,31 @@ NAME + MARC::Parser::RAW - Parser for ISO 2709 encoded MARC records SYNOPSIS - use MARC::Parser::RAW; + use MARC::Parser::RAW; + my $parser = MARC::Parser::RAW->new( $file ); - + while ( my $record = $parser->next() ) { # do something } DESCRIPTION + MARC::Parser::RAW is a lightweight, fault tolerant parser for ISO 2709 encoded MARC records. Tags, indicators and subfield codes are not - validated against the MARC standard. Record length from leader and field - lengths from the directory are ignored. Records with a faulty structure - will be skipped with a warning. The resulting data structure is - optimized for usage with the Catmandu data tool kit. + validated against the MARC standard. Record length from leader and + field lengths from the directory are ignored. Records with a faulty + structure will be skipped with a warning. The resulting data structure + is optimized for usage with the Catmandu data tool kit. MARC::Parser::RAW expects UTF-8 encoded files as input. Otherwise provide a filehande with a specified I/O layer or specify encoding. MARC + The MARC record is parsed into an ARRAY of ARRAYs: $record = [ @@ -35,39 +39,57 @@ ]; METHODS - new($file|$fh [, $encoding]) - Configuration - "file" - Path to file with raw MARC records. - "fh" - Open filehandle for raw MARC records. + new($file|$fh|$scalarref [, $encoding]) + + Configuration + + file + + Path to file with raw MARC records. + + fh + + Open filehandle for raw MARC records. - "encoding" - Set encoding. Default: UTF-8. Optional. + scalarref + + Reference to scalar with raw MARC records. + + encoding + + Set encoding. Default: UTF-8. Optional. + + next() - next() Reads the next record from MARC input stream. Returns a Perl hash. - _decode($record) + _decode($record) + Deserialize a raw MARC record to an ARRAY of ARRAYs. - _field($field) + _field($field) + Split MARC field string in individual components. AUTHOR + Johann Rolschewski COPYRIGHT + Copyright 2014- Johann Rolschewski LICENSE + This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEEALSO + Catmandu, Catmandu::Importer::MARC. ACKNOWLEDGEMENT + The parser methods are adapted from Marc Chantreux's MARC::MIR module. diff -Nru libmarc-parser-raw-perl-0.03/t/00-load.t libmarc-parser-raw-perl-0.06/t/00-load.t --- libmarc-parser-raw-perl-0.03/t/00-load.t 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/t/00-load.t 2018-02-14 17:17:09.000000000 +0000 @@ -4,8 +4,8 @@ BEGIN { use_ok 'MARC::Parser::RAW'; - } +} require_ok 'MARC::Parser::RAW'; -done_testing 2; \ No newline at end of file +done_testing 2; diff -Nru libmarc-parser-raw-perl-0.03/t/01-parser.t libmarc-parser-raw-perl-0.06/t/01-parser.t --- libmarc-parser-raw-perl-0.03/t/01-parser.t 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/t/01-parser.t 2018-02-14 17:17:09.000000000 +0000 @@ -4,38 +4,38 @@ use MARC::Parser::RAW; +my $data + = '00755cam 22002414a 4500001001300000003000600013005001700019008004100036010001700077020004300094040001800137042000800155050002600163082001700189100003100206245005400237260004200291300007200333500003300405650003700438630002500475630001300500fol05731351 IMchF20000613133448.0000107s2000 nyua 001 0 eng  a 00020737  a0471383147 (paper/cd-rom : alk. paper) aDLCcDLCdDLC apcc00aQA76.73.P22bM33 200000a005.13/32211 aMartinsson, Tobias,d1976-10aActivePerl with ASP and ADO /cTobias Martinsson. aNew York :bJohn Wiley & Sons,c2000. axxi, 289 p. :bill. ;c23 cm. +e1 computer laser disc (4 3/4 in.) a"Wiley Computer Publishing." 0aPerl (Computer program language)00aActive server pages.00aActiveX.'; + +open my $fh, '<', \$data or die "cannot open file"; + new_ok( 'MARC::Parser::RAW' => ['./t/camel.mrc'] ); -new_ok( 'MARC::Parser::RAW' => ['./t/camel.mrc', 'UTF-8'] ); -can_ok( 'MARC::Parser::RAW', qw{ next }); -my $failure = eval { MARC::Parser::RAW->new() }; +new_ok( 'MARC::Parser::RAW' => [ './t/camel.mrc', 'UTF-8' ] ); +new_ok( 'MARC::Parser::RAW' => [ \$data ] ); +new_ok( 'MARC::Parser::RAW' => [$fh] ); +can_ok( 'MARC::Parser::RAW', qw{ next } ); + +my $failure = eval { MARC::Parser::RAW->new() }; is( $failure, undef, 'croak missing argument' ); $failure = eval { MARC::Parser::RAW->new('./t/camel.mrk') }; -is( $failure, undef, 'croak cannot find file'); -$failure = eval { MARC::Parser::RAW->new('./t/camel.mrc', 'XXX-0') }; -is( $failure, undef, 'croak unavailable encoding'); +is( $failure, undef, 'croak cannot find file' ); +$failure = eval { MARC::Parser::RAW->new( './t/camel.mrc', 'XXX-0' ) }; +is( $failure, undef, 'croak unavailable encoding' ); my $parser = MARC::Parser::RAW->new('./t/camel.mrc'); my $record = $parser->next(); -is_deeply( - $record->[0], - [ 'LDR', undef, undef, '_', '00755cam 22002414a 4500' ], - 'LDR' -); -is_deeply( - $record->[1], - [ '001', undef, undef, '_', 'fol05731351 ' ], - 'first field' -); -is_deeply( - $record->[6], +is_deeply( $record->[0], + [ 'LDR', undef, undef, '_', '00755cam 22002414a 4500' ], 'LDR' ); +is_deeply( $record->[1], [ '001', undef, undef, '_', 'fol05731351 ' ], + 'first field' ); +is_deeply( $record->[6], [ '020', ' ', ' ', 'a', '0471383147 (paper/cd-rom : alk. paper)' ], - 'sixth field' -); + 'sixth field' ); { my @warnings; local $SIG{__WARN__} = sub { - push @warnings, @_; + push @warnings, @_; }; my $record = $parser->next(); is_deeply( @@ -44,10 +44,14 @@ 'skipped faulty records' ); is scalar(@warnings), 4, 'got warnings'; - like $warnings[0], qr{no fields found in record}, 'carp no fields found in record'; - like $warnings[1], qr{no valid record leader found in record}, 'carp no valid record leader found in record'; - like $warnings[2], qr{different number of tags and fields in record}, 'carp different number of tags and fields in record'; - like $warnings[3], qr{incomplete directory entry in record}, 'carp incomplete directory entry in record'; + like $warnings[0], qr{no fields found in record}, + 'carp no fields found in record'; + like $warnings[1], qr{no valid record leader found in record}, + 'carp no valid record leader found in record'; + like $warnings[2], qr{different number of tags and fields in record}, + 'carp different number of tags and fields in record'; + like $warnings[3], qr{incomplete directory entry in record}, + 'carp incomplete directory entry in record'; } -done_testing; \ No newline at end of file +done_testing; diff -Nru libmarc-parser-raw-perl-0.03/t/author-pod-syntax.t libmarc-parser-raw-perl-0.06/t/author-pod-syntax.t --- libmarc-parser-raw-perl-0.03/t/author-pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/t/author-pod-syntax.t 2018-02-14 17:17:09.000000000 +0000 @@ -0,0 +1,15 @@ +#!perl + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + print qq{1..0 # SKIP these tests are for testing by the author\n}; + exit + } +} + +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. +use strict; use warnings; +use Test::More; +use Test::Pod 1.41; + +all_pod_files_ok(); diff -Nru libmarc-parser-raw-perl-0.03/t/release-pod-syntax.t libmarc-parser-raw-perl-0.06/t/release-pod-syntax.t --- libmarc-parser-raw-perl-0.03/t/release-pod-syntax.t 2015-06-16 16:12:57.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/t/release-pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!perl - -BEGIN { - unless ($ENV{RELEASE_TESTING}) { - require Test::More; - Test::More::plan(skip_all => 'these tests are for release candidate testing'); - } -} - -# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. -use Test::More; -use Test::Pod 1.41; - -all_pod_files_ok(); diff -Nru libmarc-parser-raw-perl-0.03/t/release-tidyall.t libmarc-parser-raw-perl-0.06/t/release-tidyall.t --- libmarc-parser-raw-perl-0.03/t/release-tidyall.t 1970-01-01 00:00:00.000000000 +0000 +++ libmarc-parser-raw-perl-0.06/t/release-tidyall.t 2018-02-14 17:17:09.000000000 +0000 @@ -0,0 +1,15 @@ + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + print qq{1..0 # SKIP these tests are for release candidate testing\n}; + exit + } +} + +use strict; +use warnings; + +use Test::More; +use Test::Code::TidyAll; + +tidyall_ok();