Hello community, here is the log from the commit of package perl-Business-ISBN for openSUSE:Factory checked in at 2016-08-17 11:56:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Business-ISBN (Old) and /work/SRC/openSUSE:Factory/.perl-Business-ISBN.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Business-ISBN" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Business-ISBN/perl-Business-ISBN.changes 2014-09-25 08:42:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Business-ISBN.new/perl-Business-ISBN.changes 2016-08-17 11:56:52.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Aug 11 05:06:02 UTC 2016 - co...@suse.com + +- updated to 3.002 + see /usr/share/doc/packages/perl-Business-ISBN/Changes + +------------------------------------------------------------------- Old: ---- Business-ISBN-2.09.tar.gz New: ---- Business-ISBN-3.002.tar.gz cpanspec.yml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Business-ISBN.spec ++++++ --- /var/tmp/diff_new_pack.QfOGQt/_old 2016-08-17 11:56:53.000000000 +0200 +++ /var/tmp/diff_new_pack.QfOGQt/_new 2016-08-17 11:56:53.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Business-ISBN # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,25 +17,26 @@ Name: perl-Business-ISBN -Version: 2.09 +Version: 3.002 Release: 0 %define cpan_name Business-ISBN Summary: Work with International Standard Book Numbers License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Business-ISBN/ -Source: http://www.cpan.org/authors/id/B/BD/BDFOY/%{cpan_name}-%{version}.tar.gz +Source0: http://www.cpan.org/authors/id/B/BD/BDFOY/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Business::ISBN::Data) >= 20140910 -BuildRequires: perl(GD) -BuildRequires: perl(GD::Barcode::EAN13) -BuildRequires: perl(URI) -#BuildRequires: perl(Test::Pod) -Requires: perl(Business::ISBN::Data) >= 20140910 -Requires: perl(URI) +BuildRequires: perl(Business::ISBN::Data) >= 20140910.002 +BuildRequires: perl(Mojo::DOM) +BuildRequires: perl(Mojo::UserAgent) +BuildRequires: perl(Test::More) >= 0.95 +Requires: perl(Business::ISBN::Data) >= 20140910.002 +Requires: perl(Mojo::DOM) +Requires: perl(Mojo::UserAgent) %{perl_requires} %description @@ -59,6 +60,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc bad-isbn13s.txt bad-isbns.txt Changes examples isbn13s.txt isbns.txt LICENSE MYMETA.json MYMETA.yml README +%doc bad-isbn13s.txt bad-isbns.txt Changes examples isbn13s.txt isbns.txt LICENSE %changelog ++++++ Business-ISBN-2.09.tar.gz -> Business-ISBN-3.002.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/Changes new/Business-ISBN-3.002/Changes --- old/Business-ISBN-2.09/Changes 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/Changes 2016-08-10 11:30:52.000000000 +0200 @@ -1,209 +1,243 @@ -Revision history for Perl extension Business::ISBN. +Revision history for Perl module Business::ISBN -2.09 - Sat Sep 20 18:15:37 2014 +3.002 2016-08-10T09:30:21Z + * Bump to stable versions + +3.001_01 2016-08-06T08:14:59Z + * Remove xisbn stuffâit's due to be turned off. + * Bump the major version for the API change + +2.011_01 2016-07-29T20:50:01Z + * Remove the URI prereq + +2.011 2016-06-07T18:20:50Z + * bump to stable release + +2.010_01 2016-03-28T03:45:17Z + * Had error_* methods to get the error text and check the error + conditions so you don't have to use %ERROR_TEXT or the constants. + * Deprecate the xisbn stuff. It's still there, but it should have + disappeared about two weeks ago. + * Add an example of inserting an unofficial group code for the + Blake and Taylor shenanigans. + +2.010 2015-12-15T07:35:57Z + * Sync latest dependencies in build and module files + * Promote to a stable release + +2.09_02 - Mon Aug 31 02:24:10 2015 + * Have a simple fallback for parsing XML if Mojo::DOM isn't there + +2.09_01 2015-08-31T05:59:56Z + * Fix for new xISBN responses that have whitespace inside the + opening tag. + * Use Mojo::DOM to parse XML and Mojo::UserAgent to fetch xISBN. + * You can still use LWP::UserAgent to fetch data. + +2.09 - 2014-09-20 * Break circular dependency on Test::ISBN -2.08 - Fri Sep 19 12:53:21 2014 +2.08 - 2014-09-19 * Add increment and decrement to create new article numbers (Markus Spann) -2.07 - Fri Jan 3 14:20:04 2014 +2.07 - 2014-01-03 * Get rid of MYMETA -2.06 - Fri May 31 15:41:48 2013 +2.06 - 2013-05-31 * Bump to a stable user release. There are no code changes. -2.05_03 - Sun Aug 5 14:50:30 2012 - Fix test with now-valid group code (RT 78671) +2.05_03 - 2012-08-05 + * Fix test with now-valid group code (RT 78671) -2.05_01 - Tue Jul 19 07:12:18 2011 +2.05_01 - 2011-07-19 * Update the URL for the Worldcat stuff so xisbn works. * Various distro cleanups. -2.05 - Sun Jan 25 00:00:17 2009 +2.05 - 2009-01-25 * Updated for latest data in Business::ISBN::Data -2.04_01 - Mon Oct 27 12:08:03 2008 - * Revert the GD prereq. A lot of testers have borked GD +2.04_01 - 2008-10-27 + * Revert the GD prereq. A lot of testers have borked GD installs. * Require 5.8. Some of the new stuff isn't playing well with 5.6 -2.04 - Sun Oct 26 18:29:20 2008 - * Fix tests that used 99902 as a bad prefix. That now +2.04 - 2008-10-26 + * Fix tests that used 99902 as a bad prefix. That now belongs to Gabon. -2.03 - Sat Oct 27 02:48:15 2007 +2.03 - 2007-10-27 * adjustments to make png_barcode.t actually work (RT #30291) -2.03 - Tue Oct 2 03:17:34 2007 +2.03 - 2007-10-02 * Fixed minor distro problems and bumped to release version 2.03 -2.02_05 - Wed Sep 12 13:27:09 2007 +2.02_05 - 2007-09-12 * Explore RT #29292. I don't seem to have the problem with hyphens for ISBN-13, but let's see what CPAN Testers has to say -2.02_04 - Sat Sep 1 14:55:00 2007 - [BUGFIX] ISBN13 was returning "Bookland" for all groups, but +2.02_04 - 2007-09-01 + * [BUGFIX] ISBN13 was returning "Bookland" for all groups, but it shouldn't do that. Now it returns the same thing you'd get from ISBN10 (e.g. "English", "German", ... ). -2.02_03 - Sat Sep 1 04:12:49 2007 - [BUGFIX] RT 29089 - I had the wrong _max_length for ISBN13. That 13 +2.02_03 - 2007-09-01 + * [BUGFIX] RT 29089 - I had the wrong _max_length for ISBN13. That 13 is the hint that it should be 13. :) -2.02_02 - Sat Aug 25 05:57:22 2007 - [FEATURE] added exportable function valid_isbn_checksum that +2.02_02 - 2007-08-25 + * [FEATURE] added exportable function valid_isbn_checksum that takes care of all of the object stuff for you and just gives you the answer. In previous docs, this was called is_valid_checksum even though that conflicted with an object method. It was documented but never implemented. Now it's there. :) - [BUGFIX] now should pass tests under 5.6.2, after a bit of + * [BUGFIX] now should pass tests under 5.6.2, after a bit of backporting. Upgrade already people! :) -2.02_01 - Fri Aug 17 14:00:51 2007 +2.02_01 - 2007-08-17 * Don't import import() from Exporter. There are a lot of people (apparently) using very old perls, not just CPAN Testers. -2.02 - Wed Aug 15 03:11:25 2007 +2.02 - 2007-08-15 * fixes RT #28843: an ISBN-13 with a bad prefix shouldn't croak, but return an object that explains the error. -2.01 - Sun Aug 12 22:28:01 2007 +2.01 - 2007-08-12 * Official release of Business::ISBN to handle ISBN-13 * Does not handle 979- numbers yet (need publisher data for that) - * Does handle 978-numbers, which is the 10 digit ISBN with a + * Does handle 978-numbers, which is the 10 digit ISBN with a different "country code", so it uses the same publisher data * There are significant API changes to handle the new stuff. It's not so bad, but test it before you rip out the old Business::ISBN stuff. -2.00_01 - Wed Mar 14 00:38:18 2007 +2.00_01 - 2007-03-14 * DEVELOPER RELEASE * Completely redone internals to handle ISBN-10 and ISBN-13 * Some interface changes to Business::ISBN 1.x * Removed exportable functions. -1.84 - Tue Jan 9 23:10:00 2007 +1.84 - 2007-01-09 * updated copyright and license info * no code changes, so no need to upgrade -1.82 - Sun Aug 14 11:42:18 2005 +1.82 - 2005-08-14 * fixed up publisher code validation, since 0 can be a valid code. I hadn't run into one of those before, and now I know I wasn't doing that right. * This is an important code change. Everyone should upgrade. -1.81 - Sat Aug 13 22:08:40 2005 +1.81 - 2005-08-13 * exposed the country group name as the country() method -1.80 - Tue Mar 8 16:58:47 2005 +1.80 - 2005-03-08 * added POD coverage tests and documented the uncovered methods it found -1.79 - Tue Dec 14 05:00:37 2004 +1.79 - 2004-12-14 * Updated tests for new ISBN data: previously invalid ISBNs are now valid. The latest data is in Business::ISBN::Data 1.09 and is current as of November 2004. * You don't need this version of Business::ISBN if you already have it, although you should get the latest Business::ISBN::Data. -1.78 - Sun Nov 21 19:46:40 2004 +1.78 - 2004-11-21 * Require the latest version on Business::ISBN::Data, which was unbundled in the last version. You need Business::ISBN::Data 1.08 to pass the latest tests that check for the new ranges the ISBN folks assigned a couple of years ago. -1.77 - Wed Oct 27 02:39:17 2004 +1.77 - 2004-10-27 * removed Business::ISBN::Data, which is now a separate module so - you can update the data without updating the rest of the stuff. + you can update the data without updating the rest of the stuff. Previously, CPAN.pm would install Business::ISBN::Data as a prerequisite, and this distribution would come along and overwrite it with old data. That was a bad thing. -1.76 - Fri Oct 8 16:12:51 2004 +1.76 - 2004-10-08 * somehow this module went missing from CPAN, so here it is again * no need to upgrade if you have the previous version -1.74 - Thu Sep 2 17:17:20 2004 +1.74 - 2004-09-02 * another distro fix: some documentation cleanups, and the README is now in MANIFEST. You do not need to upgrade if you already have installed this module. -1.73 - Thu Sep 2 16:21:10 2004 +1.73 - 2004-09-02 * this is a distro fix only. if you already have Business::ISBN, you don't need this -1.72 - Wed Feb 11 16:18:30 2004 +1.72 - 2004-02-11 * removed errant File::Find::Rule use * Check for modules in png_barcode before require-ing them -1.71 - Wed Jan 28 13:00:38 2004 +1.71 - 2004-01-28 * added xISBN support * removed File::Find::Rule, Test::Pod, Test::Prereq dependencies -1.69 Thu Sep 5 01:18:26 CDT 2002 - - documentation fixes - that's it - -1.68 Wed Sep 4 15:51:29 CDT 2002 - - converted to Test::More - - fixed ean_to_isbn to handle new EAN prefix 979 - -1.60 Sun Apr 1 17:06:28 EDT 2001 - - fixed some POD problems - - no changes to the actual code - -1.59 Tue Mar 27 11:51:42 EST 2001 - - fixed some -w dirty internals - - clarified documentation for as_string method +1.69 - 2002-09-05 + * documentation fixes - that's it + +1.68 - 2002-09-04 + * converted to Test::More + * fixed ean_to_isbn to handle new EAN prefix 979 + +1.60 - 2001-04-01 + * fixed some POD problems + * no changes to the actual code + +1.59 - 2001-03-27 + * fixed some -w dirty internals + * clarified documentation for as_string method -1.58 Mon Mar 26 19:47:03 EST 2001 - - there was an error in test.pl that failed to +1.58 - 2001-03-26 + * there was an error in test.pl that failed to identify a bug. Andy Lester <a...@petdance.com> found it though. the constructor was always setting $obj->is_valid to BAD_CHECKSUM. that is fixed. - - version 1.57 should not be used at all. it + * version 1.57 should not be used at all. it is severely broken due to that bug. -1.57 Wed Mar 21 18:07:17 EST 2001 - - fixed -w dirty line in is_valid_checksum +1.57 - 2001-03-21 + * fixed -w dirty line in is_valid_checksum (identified by Andy Lester <a...@petdance.com>) -1.56 Mon Mar 12 10:03:37 EST 2001 +1.56 - 2001-03-12 EVERYONE SHOULD UPGRADE TO THIS VERSION - - fixed problem parsing ISBNs without valid + * fixed problem parsing ISBNs without valid country codes which would cause an infinite loop. (identified by Andy Lester <a...@petdance.com>) - - this module is now kept in a local CVS repository - - added symbolic constants to replace magic return + * this module is now kept in a local CVS repository + * added symbolic constants to replace magic return values. see the docs for details. - - fixed is_valid_checksum which would issue warnings + * fixed is_valid_checksum which would issue warnings if the string was less than ten characters (identified by Adam Thompson <athom...@athompso.net>) - - added a test.pl which still needs more tests to + * added a test.pl which still needs more tests to reach all of the code. -1.51 Wed Jan 24 14:22:02 EST 2001 - - version 1.5 fixed some bugs with checksums - - version 1.51 has a few minor doc fixes - - now we have sane version numbers. :) - -20001010 Sat Sep 9 00:33:07 EDT 2000 - - fixed some missing arguments to _is_valid. - - updated contact information - - added some real tests to test.pl - - everyone should update their installations - -19990112 Mon Jan 11 18:03:07 EST 1999 - - added "use Exporter" which was missing. - -19980901 Tue Sep 01 15:15:30 1998 - - added support for EAN-13 (isbn -> ean, ean -> isbn ) - - cleaned up other nagging problems - - if you don't want EAN13, then you don't need this update - -19980329 Sun Mar 29 03:29:16 1998 - - original version; created by h2xs 1.18 - - gutsy enough to actually release it for testing and comments +1.51 - 2001-01-24 + * version 1.5 fixed some bugs with checksums + * version 1.51 has a few minor doc fixes + * now we have sane version numbers. :) + +20001010 - 2000-09-09 + * fixed some missing arguments to _is_valid. + * updated contact information + * added some real tests to test.pl + * everyone should update their installations + +19990112 - 1999-01-11 + * added "use Exporter" which was missing. + +19980901 - 1998-09-01 + * added support for EAN-13 (isbn -> ean, ean -> isbn ) + * cleaned up other nagging problems + * if you don't want EAN13, then you don't need this update + +19980329 - 1998-03-29 + * original version; created by h2xs 1.18 + * gutsy enough to actually release it for testing and comments diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/INSTALL.SKIP new/Business-ISBN-3.002/INSTALL.SKIP --- old/Business-ISBN-2.09/INSTALL.SKIP 1970-01-01 01:00:00.000000000 +0100 +++ new/Business-ISBN-3.002/INSTALL.SKIP 2016-08-10 11:30:52.000000000 +0200 @@ -0,0 +1,6 @@ +README\.pod +README.* + +# things that might be in local directories after fooling +# around with them +\.DS_Store diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/LICENSE new/Business-ISBN-3.002/LICENSE --- old/Business-ISBN-2.09/LICENSE 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/LICENSE 2016-08-10 11:30:52.000000000 +0200 @@ -1 +1,177 @@ -You can use Business::ISBN under the same terms as Perl itself. \ No newline at end of file +The Business::ISBN module is licensed under the same terms as perl +itself, under the Artistic License 2.0. + + +Artistic License 2.0 +Copyright (c) 2000-2006, The Perl Foundation. +http://www.perlfoundation.org/artistic_license_2_0 + +Preamble + +This license establishes the terms under which a given free software +Package may be copied, modified, distributed, and/or redistributed. +The intent is that the Copyright Holder maintains some artistic +control over the development of that Package while still keeping the +Package available as open source and free software. + +You are always permitted to make arrangements wholly outside of this +license directly with the Copyright Holder of a given Package. If the +terms of this license do not permit the full use that you propose to +make of the Package, you should contact the Copyright Holder and seek +a different licensing arrangement. + +Definitions + +"Copyright Holder" means the individual(s) or organization(s) named in +the copyright notice for the entire Package. + +"Contributor" means any party that has contributed code or other +material to the Package, in accordance with the Copyright Holder's +procedures. + +"You" and "your" means any person who would like to copy, distribute, +or modify the Package. + +"Package" means the collection of files distributed by the Copyright +Holder, and derivatives of that collection and/or of those files. A +given Package may consist of either the Standard Version, or a +Modified Version. + +"Distribute" means providing a copy of the Package or making it +accessible to anyone else, or in the case of a company or +organization, to others outside of your company or organization. + +"Distributor Fee" means any fee that you charge for Distributing this +Package or providing support for this Package to another party. It +does not mean licensing fees. + +"Standard Version" refers to the Package if it has not been modified, +or has been modified only in ways explicitly requested by the +Copyright Holder. + +"Modified Version" means the Package, if it has been changed, and such +changes were not explicitly requested by the Copyright Holder. + +"Original License" means this Artistic License as Distributed with the +Standard Version of the Package, in its current version or as it may +be modified by The Perl Foundation in the future. + +"Source" form means the source code, documentation source, and +configuration files for the Package. + +"Compiled" form means the compiled bytecode, object code, binary, or +any other form resulting from mechanical transformation or translation +of the Source form. + +Permission for Use and Modification Without Distribution + +(1) You are permitted to use the Standard Version and create and use +Modified Versions for any purpose without restriction, provided that +you do not Distribute the Modified Version. + +Permissions for Redistribution of the Standard Version + +(2) You may Distribute verbatim copies of the Source form of the +Standard Version of this Package in any medium without restriction, +either gratis or for a Distributor Fee, provided that you duplicate +all of the original copyright notices and associated disclaimers. At +your discretion, such verbatim copies may or may not include a +Compiled form of the Package. + +(3) You may apply any bug fixes, portability changes, and other +modifications made available from the Copyright Holder. The resulting +Package will still be considered the Standard Version, and as such +will be subject to the Original License. + +Distribution of Modified Versions of the Package as Source + +(4) You may Distribute your Modified Version as Source (either gratis +or for a Distributor Fee, and with or without a Compiled form of the +Modified Version) provided that you clearly document how it differs +from the Standard Version, including, but not limited to, documenting +any non-standard features, executables, or modules, and provided that +you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder of the + Standard Version, under the Original License, so that the Copyright + Holder may include your modifications in the Standard Version. + + (b) ensure that installation of your Modified Version does not prevent + the user installing or running the Standard Version. In addition, the + Modified Version must bear a name that is different from the name of + the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to make + the Source form of the Modified Version available to others under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, modify and + redistribute the Modified Version using the same licensing terms that + apply to the copy that the licensee received, and requires that the + Source form of the Modified Version, and of any works derived from it, + be made freely available in that license fees are prohibited but + Distributor Fees are allowed. + +Distribution of Compiled Forms of the Standard Version or Modified +Versions without the Source + +(5) You may Distribute Compiled forms of the Standard Version without +the Source, provided that you include complete instructions on how to +get the Source of the Standard Version. Such instructions must be +valid at the time of your distribution. If these instructions, at any +time while you are carrying out such distribution, become invalid, you +must provide new instructions on demand or cease further distribution. +If you provide valid instructions or cease distribution within thirty +days after you become aware that the instructions are invalid, then +you do not forfeit any of your rights under this license. + +(6) You may Distribute a Modified Version in Compiled form without the +Source, provided that you comply with Section 4 with respect to the +Source of the Modified Version. + +Aggregating or Linking the Package + +(7) You may aggregate the Package (either the Standard Version or +Modified Version) with other packages and Distribute the resulting +aggregation provided that you do not charge a licensing fee for the +Package. Distributor Fees are permitted, and licensing fees for other +components in the aggregation are permitted. The terms of this license +apply to the use and Distribution of the Standard or Modified Versions +as included in the aggregation. + +(8) You are permitted to link Modified and Standard Versions with +other works, to embed the Package in a larger work of your own, or to +build stand-alone binary or bytecode versions of applications that +include the Package, and Distribute the result without restriction, +provided the result does not expose a direct interface to the Package. + +Items That are Not Considered Part of a Modified Version + +(9) Works (including, but not limited to, modules and scripts) that +merely extend or make use of the Package, do not, by themselves, cause +the Package to be a Modified Version. In addition, such works are not +considered parts of the Package itself, and are not subject to the +terms of this license. + +General Provisions + +(10) Any use, modification, and distribution of the Standard or +Modified Versions is governed by this Artistic License. By using, +modifying or distributing the Package, you accept this license. Do not +use, modify, or distribute the Package, if you do not accept this +license. + +(11) If your Modified Version has been derived from a Modified Version +made by someone other than you, you are nevertheless required to +ensure that your Modified Version complies with the requirements of +this license. + +(12) This license does not grant you the right to use any trademark, +service mark, tradename, or logo of the Copyright Holder. + +(13) This license includes the non-exclusive, worldwide, +free-of-charge patent license to make, have made, use, offer to sell, +sell, import and otherwise transfer the Package with respect to any +patent claims licensable by the Copyright Holder that are necessarily +infringed by the Package. If you institute patent litigation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/MANIFEST new/Business-ISBN-3.002/MANIFEST --- old/Business-ISBN-2.09/MANIFEST 2014-09-21 00:16:01.000000000 +0200 +++ new/Business-ISBN-3.002/MANIFEST 2016-08-10 11:30:54.000000000 +0200 @@ -1,7 +1,9 @@ bad-isbn13s.txt bad-isbns.txt Changes +examples/private_group_code.pl examples/README +INSTALL.SKIP isbn13s.txt isbns.txt lib/Business/ISBN.pm @@ -9,12 +11,13 @@ lib/Business/ISBN13.pm LICENSE Makefile.PL -MANIFEST +MANIFEST This list of files MANIFEST.SKIP -README +README.pod scripts/get_isbn_data.pl t/albania.t t/constants.t +t/errors.t t/github/3.t t/interface.t t/isbn10.t @@ -30,6 +33,6 @@ t/step.t t/test_manifest t/valid_isbn_checksum.t -t/xisbn10.t +xt/changes.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/META.json new/Business-ISBN-3.002/META.json --- old/Business-ISBN-2.09/META.json 2014-09-21 00:16:01.000000000 +0200 +++ new/Business-ISBN-3.002/META.json 2016-08-10 11:30:54.000000000 +0200 @@ -1,10 +1,10 @@ { - "abstract" : "Parse and validate ISBNs", + "abstract" : "work with International Standard Book Numbers", "author" : [ "brian d foy <bd...@cpan.org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.120921", + "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.140640", "license" : [ "perl_5" ], @@ -21,19 +21,20 @@ }, "prereqs" : { "build" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } + "requires" : {} }, "configure" : { "requires" : { - "ExtUtils::MakeMaker" : "0" + "ExtUtils::MakeMaker" : "6.64", + "File::Spec::Functions" : "0" } }, "runtime" : { "requires" : { - "Business::ISBN::Data" : "20140910", - "URI" : "0" + "Business::ISBN::Data" : "20140910.002", + "Mojo::DOM" : "0", + "Mojo::UserAgent" : "0", + "perl" : "5.008" } }, "test" : { @@ -44,11 +45,15 @@ }, "release_status" : "stable", "resources" : { + "bugtracker" : { + "web" : "https://github.com/briandfoy/business-isbn/issues" + }, + "homepage" : "https://github.com/briandfoy/business-isbn", "repository" : { "type" : "git", - "url" : "https://github.com/briandfoy/business--isbn.git", - "web" : "https://github.com/briandfoy/business--isbn" + "url" : "https://github.com/briandfoy/business-isbn.git", + "web" : "https://github.com/briandfoy/business-isbn" } }, - "version" : "2.09" + "version" : "3.002" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/META.yml new/Business-ISBN-3.002/META.yml --- old/Business-ISBN-2.09/META.yml 2014-09-21 00:16:01.000000000 +0200 +++ new/Business-ISBN-3.002/META.yml 2016-08-10 11:30:54.000000000 +0200 @@ -1,26 +1,30 @@ --- -abstract: 'Parse and validate ISBNs' +abstract: 'work with International Standard Book Numbers' author: - 'brian d foy <bd...@cpan.org>' build_requires: - ExtUtils::MakeMaker: 0 - Test::More: 0.95 + Test::More: '0.95' configure_requires: - ExtUtils::MakeMaker: 0 + ExtUtils::MakeMaker: '6.64' + File::Spec::Functions: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.120921' +generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.140640' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: Business-ISBN no_index: directory: - t - inc requires: - Business::ISBN::Data: 20140910 - URI: 0 + Business::ISBN::Data: '20140910.002' + Mojo::DOM: '0' + Mojo::UserAgent: '0' + perl: '5.008' resources: - repository: https://github.com/briandfoy/business--isbn.git -version: 2.09 + bugtracker: https://github.com/briandfoy/business-isbn/issues + homepage: https://github.com/briandfoy/business-isbn + repository: https://github.com/briandfoy/business-isbn.git +version: '3.002' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/Makefile.PL new/Business-ISBN-3.002/Makefile.PL --- old/Business-ISBN-2.09/Makefile.PL 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/Makefile.PL 2016-08-10 11:30:52.000000000 +0200 @@ -1,35 +1,114 @@ -require 5.008; +package Business::ISBN; +use strict; +use warnings; -use ExtUtils::MakeMaker 6.65; +=encoding utf8 -eval "use Test::Manifest 1.21"; - -WriteMakefile( - 'NAME' => 'Business::ISBN', - 'ABSTRACT' => 'Parse and validate ISBNs', - 'VERSION_FROM' => 'lib/Business/ISBN.pm', +=head1 The build file for Business::ISBN + +This build file is a modulino; it works as both a build script and +a module. + +To build the distribution, run this file normally: + + % perl Makefile.PL + +But, it's more interesting than that. You can load it with C<require> +and call C<arguments> to get the data structure it passes to +C<WriteMakefile>: + + my $package = require '/path/to/Makefile.PL'; + my $arguments = $package->arguments; + +Note that C<require>-ing a file makes an entry in C<%INC> for exactly +that name. If you try to C<require> another file with the same name, +even from a different path, C<require> thinks it has already loaded +the file. As such, I recommend you always require the full path to the +file. + +The return value of the C<require> is a package name (in this case, +the name of the main module. Use that to call the C<arguments> method. + +Even if this distribution needs a higher version of Perl, this bit +only needs v5.8. You can play with the data structure with a primitive +Perl. + +=cut + +use File::Spec::Functions qw(catfile); + +my $module = __PACKAGE__; +( my $dist = $module ) =~ s/::/-/g; + +my $github = 'https://github.com/briandfoy/business-isbn'; +my $main_file = catfile( 'lib', split /::/, "$module.pm" ); + +my %WriteMakefile = ( + 'MIN_PERL_VERSION' => '5.008', + + 'NAME' => $module, + 'ABSTRACT_FROM' => $main_file, + 'VERSION_FROM' => $main_file, 'LICENSE' => 'perl', 'AUTHOR' => 'brian d foy <bd...@cpan.org>', - 'PREREQ_PM' => { - 'Business::ISBN::Data' => '20140910', - 'URI' => '0', + 'CONFIGURE_REQUIRES' => { + 'ExtUtils::MakeMaker' => '6.64', + 'File::Spec::Functions' => '0', + }, + + 'BUILD_REQUIRES' => { }, 'TEST_REQUIRES' => { - 'Test::More' => '0.95', + 'Test::More' => '0.95', + }, + + 'PREREQ_PM' => { + 'Business::ISBN::Data' => '20140910.002', + 'Mojo::DOM' => '0', + 'Mojo::UserAgent' => '0', }, 'META_MERGE' => { 'meta-spec' => { version => 2 }, - resources => { - repository => { - type => 'git', - url => 'https://github.com/briandfoy/business--isbn.git', - web => 'https://github.com/briandfoy/business--isbn', + resources => { + repository => { + type => 'git', + url => "$github.git", + web => $github, }, + bugtracker => { + web => "$github/issues", + }, + homepage => $github, }, }, - clean => { FILES => '*.bak Business-*' }, + clean => { FILES => "$dist-*" }, ); + +sub arguments { \%WriteMakefile } + +do_it() unless caller; +sub do_it { + require File::Spec; + my $MM ='ExtUtils::MakeMaker'; + my $MM_version = + eval{ "$MM " . $WriteMakefile{'CONFIGURE_REQUIRES'}{'ExtUtils::MakeMaker'} } + || + "$MM 6.64"; + eval "use $MM_version; 1" or die "Could not load $MM_version: $@"; + eval "use Test::Manifest 1.21" + if -e File::Spec->catfile( qw(t test_manifest) ); + + my $arguments = arguments(); + my $minimum_perl = $arguments->{MIN_PERL_VERSION} || '5.008'; + eval "require $minimum_perl;" or die $@; + + WriteMakefile( %$arguments ); + } + + +no warnings; +__PACKAGE__; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/README new/Business-ISBN-3.002/README --- old/Business-ISBN-2.09/README 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -You can install this using in the usual Perl fashion - - perl Makefile.PL - make - make test - make install - -The documentation is in the module file. Once you install -the file, you can read it with perldoc. - - perldoc Business::ISBN - -If you want to read it before you install it, you can use -perldoc directly on the module file. - - perldoc ISBN.pm - -This module is also on Github - - https://github.com/briandfoy/business--isbn/ - -Enjoy, - -brian d foy, bd...@cpan.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/README.pod new/Business-ISBN-3.002/README.pod --- old/Business-ISBN-2.09/README.pod 1970-01-01 01:00:00.000000000 +0100 +++ new/Business-ISBN-3.002/README.pod 2016-08-10 11:30:52.000000000 +0200 @@ -0,0 +1,116 @@ +=pod + +=encoding utf8 + +=head1 The Business::ISBN module + +This is the I<README> for the L<Business::ISBN> Perl module, which +handles International Standard Book Numbers. + +You're probably looking at this because you don't know where else to +find what you're looking for. Read this once and you might never have +to read one again for any Perl module. + +=head2 Documentation + +To read about L<Business::ISBN>, look at the embedded documentation +in the module itself. Inside the distribution, you can format it +with L<perldoc|http://perldoc.perl.org/perldoc.html>: + + % perldoc lib/Business/ISBN.pm + +If you have already installed the module, you can specify the module +name instead of the file location: + + % perldoc Business::ISBN + +You can read the documentation and inspect the meta data on one of the +CPAN web interfaces, such as L<CPAN Search|http://search.cpan.org/dist/Business-ISBN> or +L<MetaCPAN|http://www.metacpan.org/module/Business::ISBN>: + +=over 4 + +=item * L<http://search.cpan.org/dist/Business-ISBN> + +=item * L<http://www.metacpan.org/module/Business::ISBN> + +=back + +The standard module documentation has example uses in the SYNOPSIS +section, but you can also look in the I<examples/> directory (if it's +there), or look at the test files in I<t/>. + +=head2 Installation + +You can install this module with a CPAN client, which will resolve +and install the dependencies: + + % cpan Business::ISBN + % cpanm Business::ISBN + +You can also install directly from the distribution directory, which +will also install the dependencies: + + % cpan . + % cpanm . + +You could install just this module manually: + + % perl Makefile.PL + % make + % make test + % make install + +You probably don't want to do that unless you're fiddling with the +module and only want to run the tests without installing anything. + +=head2 Source location + +The meta data, such as the source repository and bug tracker, is in +I<Makefile.PL> or the I<META.*> files it creates. You can find that on +those CPAN web interfaces, but you can also look at files directly in +the source repository: + +=over 4 + +=item * L<https://github.com/briandfoy/business-isbn> + +=back + +If you find a problem, file a ticket in the L<issue +tracker|https://github.com/briandfoy/business-isbn/issues>: + +=over 4 + +=item * L<https://github.com/briandfoy/business-isbn/issues> + +=back + +=head2 Getting help + +Although I'm happy to hear from module users in private email, +that's the best way for me to forget to do something. + +Besides the issue trackers, you can find help at +L<Perlmonks|http://www.perlmonks.org> or +L<Stackoverflow|http://www.stackoverflow.com>, both of which have many +competent Perlers who can answer your question, almost in real time. +They might not know the particulars of this module, but they can help +you diagnose your problem. + +You might like to read L<brian's Guide to Solving Any Perl +Problem|http://archive.oreilly.com/pub/a/perl/excerpts/9780596527242/brians-guide.html>. + +=head2 Copyright and License + +You should have received a I<LICENSE> file, but the license is also noted +in the module files. About the only thing you can't do is pretend that +you wrote code that you didn't. + +=head2 Good luck! + +Enjoy, + +brian d foy, bd...@cpan.org + +=cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/examples/private_group_code.pl new/Business-ISBN-3.002/examples/private_group_code.pl --- old/Business-ISBN-2.09/examples/private_group_code.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/Business-ISBN-3.002/examples/private_group_code.pl 2016-08-10 11:30:52.000000000 +0200 @@ -0,0 +1,83 @@ +#!perl +use v5.22; +use feature qw(refaliasing signatures postderef); +no warnings map { "experimental::$_" } qw(refaliasing signatures postderef); + +################################################################## +# I added the error_text method in this version. You might have +# to pull from GitHub to use the latest sources. +# https://github.com/briandfoy/business-isbn +use Business::ISBN '2.010_01'; + +################################################################## +# https://bugs.launchpad.net/evergreen/+bug/1559281/comments/2 +# +# This UbuntuOne thread has some example data for a publisher using +# unassigned group codes. It does not note what the publisher code +# ranges should be. +my @tests = ( + [ qw(9786316294241 6316294247) ], # https://www.worldcat.org/title/black-mass/oclc/933728185 + [ qw(9786316271976 6316271972) ], # DVD "Bridge of Spies" - https://www.worldcat.org/title/bridge-of-spies/oclc/933729520 + [ qw(9786316364036) ], # DVD "Alvin and the Chipmunks. The road chip" - http://www.btol.com/home_whatshot_details.cfm?sideMenu=Featured%20CDs%20and%20DVDs&home=home_whatshot_details.cfm + [ qw(9786316334886) ], # DVD "Spectre" + [ qw(9786316321183) ], # DVD "Southerner" + [ qw(9786316319401) ], # DVD "Spotlight" + [ qw(9786316291431) ], # DVD "Steve Jobs" + ); + +################################################################## +# This part tries the test cases with the official ISBN data +# These should fail since the publisher is using unassigned group +# codes, which are cleverly created in a way that an invalid +# group code throws off the rest of the parsing. +say "========= Before fake group insertion"; +test_isbns( \@tests ); + +################################################################## +# Now insert the fake group code by playing with the internal data +# structure that you aren't supposed to know about. But, if you want +# to use "bad" data, that's the trade-off +say "========= After fake group insertion"; + +# the group code is a key in this hash. The first element of the +# array ref is the label for the group code. The second argument is +# another array ref that are the publisher code ranges. To see more, +# look as Business::ISBN::Data's guts. The publisher ranges must be +# strings so items such as "00" are correctly handled as something of +# length 2. +# +# I don't know what Baker and Taylor are claiming to be the publishers. +$Business::ISBN::country_data{ '631' } = [ + 'Baker and Taylor', + [ '0' => '9' ], + ]; +test_isbns( \@tests ); + +################################################################## +# This sub goes through the array of arrays and makes an ISBN +# object out of each thing. It's an array of arrays because I +# kept together the ISBN-10 and ISBN-13 versions. +# +# I use three experimental Perl features here (if I'm going to spend +# the time writing the example for you, I get to choose!), but it's +# not much work to not use them. You get the idea of what this is +# doing. +sub test_isbns ( $tests ) { + foreach \my @test ( $tests->@* ) { + foreach my $test_isbn ( @test ) { + my $isbn = Business::ISBN->new( $test_isbn ); + if( $isbn->is_valid ) { + say "$test_isbn is valid"; + say "\tgroup -> ", $isbn->group_code; + say "\tpublisher -> ", $isbn->publisher_code; + say "\tarticle -> ", $isbn->article_code; + say "\tchecksum -> ", $isbn->checksum; + } + else { + printf qq(%s is not valid! Error is "%s"\n), + $test_isbn, $isbn->error_text; + } + } + } + } + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/lib/Business/ISBN.pm new/Business-ISBN-3.002/lib/Business/ISBN.pm --- old/Business-ISBN-2.09/lib/Business/ISBN.pm 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/lib/Business/ISBN.pm 2016-08-10 11:30:52.000000000 +0200 @@ -73,7 +73,7 @@ use Carp qw(carp croak cluck); use base qw(Exporter); -use Business::ISBN::Data 20140910.001; # now a separate module +use Business::ISBN::Data 20140910.002; # now a separate module # ugh, hack *group_data = *Business::ISBN::country_data; sub _group_data { $group_data{ $_[1] } } @@ -94,7 +94,7 @@ [ @{ $self->_group_data( $self->group_code )->[1] } ]; } -my $debug = 0; +my $debug = $ENV{BUSINESS_ISBN_DEBUG}; BEGIN { @EXPORT_OK = qw( @@ -110,7 +110,7 @@ ); }; -$VERSION = "2.09"; +$VERSION = '3.002'; sub ARTICLE_CODE_OUT_OF_RANGE () { -5 } sub INVALID_PREFIX () { -4 }; @@ -183,10 +183,11 @@ The constructor attempts to determine the group code and the publisher code. If these data cannot be determined, the constructor sets C<< $obj->error >> to something other than C<GOOD_ISBN>. An object is -still returned and it is up to the program to check C<< $obj->error >> -for one of five values (which may be exported on demand). The actual +still returned and it is up to the program to check the C<< error >> method +for one of five values or one of the C<< error_* >> methods to check for +a particular error. The actual values of these symbolic versions are the same as those from previous -versions of this module which used literal values. +versions of this module which used literal values: Business::ISBN::INVALID_PUBLISHER_CODE @@ -197,10 +198,13 @@ If you have one of these values and want to turn it into a string, you can use the C<%Business::ISBN::ERROR_TEXT> hash, which is exportable -by asking for it explicitly in the import list. +by asking for it explicitly in the import list: use Business::ISBN qw(%ERROR_TEXT); +As of version 2.010_01, you can get this text from C<< error_text >> +so you don't have to import anything. + The string passed as the ISBN need not be a valid ISBN as long as it superficially looks like one. This allows one to use the C<fix_checksum()> method. Despite the disclaimer in the discussion of @@ -294,7 +298,43 @@ =cut -sub error { $_[0]->{'valid'} } +sub error { $_[0]->{'valid'} < 1 and $_[0]->{'valid'} } + +=item error_is_bad_group + +=item error_is_bad_publisher + +=item error_is_article_out_of_range + +=item error_is_bad_checksum + +Returns true if the ISBN error is that type. + +=cut + +sub error_is_bad_group { + return $_[0]->error == INVALID_GROUP_CODE; + } + +sub error_is_bad_publisher { + return $_[0]->error == INVALID_PUBLISHER_CODE; + } + +sub error_is_article_out_of_range { + return $_[0]->error == ARTICLE_CODE_OUT_OF_RANGE; + } + +sub error_is_bad_checksum { + return $_[0]->error == BAD_CHECKSUM; + } + +=item error_text + +Returns a text version of the error text + +=cut + +sub error_text { $ERROR_TEXT{$_[0]->{'valid'}} } =item is_valid @@ -524,46 +564,6 @@ croak "as_isbn13() must be implemented in Business::ISBN subclass" } -=item xisbn - -In scalar context, returns an anonymous array of related ISBNs using xISBN. -In list context, returns a list. - -This feature requires C<LWP::Simple>. - -=cut - -sub xisbn { - my $self = shift; - - my $data = $self->_get_xisbn; - $data =~ tr/x/X/; - - my @isbns = $data =~ m|<isbn>(.*?)</isbn>|ig; - shift @isbns; - wantarray ? @isbns : \@isbns; - } - -sub _get_xisbn { - my $self = shift; - - eval "use LWP::Simple"; - if( $@ ) { carp "You need LWP::Simple to use xisbn()"; return; } - - my $data = LWP::Simple::get( $self->_xisbn_url ); - - carp "Could not fetch xISBN data" unless defined $data; - - return $data; - } - -sub _xisbn_url { - my $self = shift; - my $isbn = $self->as_string([]); - - return "http://xisbn.worldcat.org/xid/isbn/$isbn"; - } - =item increment Returns the next C<Business::ISBN> by incrementing the article code of @@ -616,11 +616,11 @@ ; my $next_isbn = Business::ISBN->new( - join('', - $self->prefix, - $self->group_code, - $self->publisher_code, - sprintf( "%0*d", $self->article_code_length, $next_article_code ), + join('', + $self->prefix, + $self->group_code, + $self->publisher_code, + sprintf( "%0*d", $self->article_code_length, $next_article_code ), '0' ) ); @@ -877,7 +877,7 @@ This source is in Github: - https://github.com/briandfoy/business--isbn + https://github.com/briandfoy/business-isbn =head1 AUTHOR @@ -885,7 +885,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (c) 2001-2014, brian d foy, All Rights Reserved. +Copyright © 2001-2016, brian d foy <bd...@cpan.org>. All rights reserved. You may redistribute this under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/lib/Business/ISBN10.pm new/Business-ISBN-3.002/lib/Business/ISBN10.pm --- old/Business-ISBN-2.09/lib/Business/ISBN10.pm 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/lib/Business/ISBN10.pm 2016-08-10 11:30:52.000000000 +0200 @@ -4,15 +4,6 @@ use Business::ISBN qw(:all); -use subs qw( - _checksum - INVALID_GROUP_CODE - INVALID_PUBLISHER_CODE - BAD_CHECKSUM - GOOD_ISBN - BAD_ISBN - ); - use vars qw( $VERSION $debug @@ -24,7 +15,7 @@ my $debug = 0; -$VERSION = '2.09'; +$VERSION = '3.002'; sub _max_length { 10 } @@ -89,6 +80,8 @@ __END__ +=encoding utf8 + =head1 NAME Business::ISBN10 - work with 10 digit International Standard Book Numbers @@ -105,7 +98,7 @@ This source is in Github: - https://github.com/briandfoy/business--isbn + https://github.com/briandfoy/business-isbn =head1 AUTHOR @@ -113,7 +106,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (c) 2001-2014, brian d foy, All Rights Reserved. +Copyright © 2001-2016, brian d foy <bd...@cpan.org>. All rights reserved. You may redistribute this under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/lib/Business/ISBN13.pm new/Business-ISBN-3.002/lib/Business/ISBN13.pm --- old/Business-ISBN-2.09/lib/Business/ISBN13.pm 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/lib/Business/ISBN13.pm 2016-08-10 11:30:52.000000000 +0200 @@ -5,14 +5,6 @@ use Business::ISBN qw(:all); use Data::Dumper; -use subs qw( - _checksum - INVALID_COUNTRY_CODE - INVALID_PUBLISHER_CODE - BAD_CHECKSUM - GOOD_ISBN - BAD_ISBN - ); use vars qw( $VERSION $debug @@ -22,7 +14,7 @@ my $debug = 0; -$VERSION = '2.09'; +$VERSION = '3.002'; sub _max_length { 13 } @@ -100,6 +92,8 @@ __END__ +=encoding utf8 + =head1 NAME Business::ISBN13 - work with 13 digit International Standard Book Numbers @@ -116,7 +110,7 @@ This source is in Github. - https://github.com/briandfoy/business--isbn + https://github.com/briandfoy/business-isbn =head1 AUTHOR @@ -124,7 +118,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (c) 2001-2014, brian d foy, All Rights Reserved. +Copyright © 2001-2016, brian d foy <bd...@cpan.org>. All rights reserved. You may redistribute this under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/t/errors.t new/Business-ISBN-3.002/t/errors.t --- old/Business-ISBN-2.09/t/errors.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Business-ISBN-3.002/t/errors.t 2016-08-10 11:30:52.000000000 +0200 @@ -0,0 +1,45 @@ +use Test::More; + +my $class = 'Business::ISBN'; + +use_ok( $class ) or BAIL_OUT( "$class did not compile" ); +can_ok( $class, qw( error_text error ) ); + +subtest bad_group => sub { + can_ok( $class, qw(error_is_bad_group error_text error) ); + # blake and taylor fake ISBNs for their DVDs + my @bad_isbns = qw(9786316294241 6316294247); + + foreach my $try ( @bad_isbns ) { + my $isbn = $class->new( $try ); + ok( ! $isbn->is_valid, "ISBN $try is invalid" ); + ok( $isbn->error, "ISBN $try is an error" ); + like( $isbn->error_text, qr/group/, "ISBN $try error text mentions 'group'" ); + ok( $isbn->error_is_bad_group, "ISBN $try has a bad group" ); + } + + my @good_isbns = qw(0596527241); + + foreach my $try ( @good_isbns ) { + my $isbn = $class->new( $try ); + ok( $isbn->is_valid, "ISBN $try is valid" ); + ok( ! $isbn->error, "ISBN $try is not an error" ); + } + }; + +subtest bad_publisher => sub { + can_ok( $class, qw(error_is_bad_publisher) ); + + my @bad_isbns = qw(9656123456); + + foreach my $try ( @bad_isbns ) { + my $isbn = $class->new( $try ); + ok( ! $isbn->is_valid, "ISBN $try is invalid" ); + ok( $isbn->error, "ISBN $try is an error" ); + like( $isbn->error_text, qr/publisher/, "ISBN $try error text mentions 'publisher'" ); + ok( $isbn->error_is_bad_publisher, "ISBN $try has a bad publisher" ); + } + }; + + +done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/t/test_manifest new/Business-ISBN-3.002/t/test_manifest --- old/Business-ISBN-2.09/t/test_manifest 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/t/test_manifest 2016-08-10 11:30:52.000000000 +0200 @@ -7,7 +7,7 @@ isbn10.t isbn13.t valid_isbn_checksum.t -xisbn10.t +errors.t png_barcode.t step.t rt/27107.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/t/xisbn10.t new/Business-ISBN-3.002/t/xisbn10.t --- old/Business-ISBN-2.09/t/xisbn10.t 2014-09-21 00:16:00.000000000 +0200 +++ new/Business-ISBN-3.002/t/xisbn10.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,67 +0,0 @@ -use Test::More; - -BEGIN { - require IO::Socket; - - my $host = 'labs.oclc.org'; - - my $socket = IO::Socket::INET->new( - PeerAddr => "$host:80", - Timeout => 5, - ); - - unless( $socket ) - { - print STDERR <<"HERE"; - --------------------------------------------------------- -I cannot run these tests unless I can connect to $host. -You may not be connected to the network or the host may -be down. --------------------------------------------------------- -HERE - - plan skip_all => "Could not reach $host: skipping tests"; - } - } - - - - -my $hash = { - '1565922573' => [qw(0585054061)], - '0684833395' => [qw(0671502336 044011120X 0679437223 0440204399 0886461251 0684865130 067189854X 070898164X 1560549602 0736690859 0736689621 0671202960 0224613286 0886464935 5237000665 9660301588 1560549238 8401410266 9576773075 0552015008 2246269318 8388087398 5718100012 8306023056 4653014507 5770770910 8385855807 7805676291 8939202376 8939202384 8939202392 9633070597 9735761599 3596125723 5273001285 7531213451 8387974811 8474444896 8501009261 8700199583 8700964344 8845228827 9146133690 9512045583 9635483325)], - }; - -my @isbns = sort keys %$hash; - -plan tests => 6 * @isbns + 1; - -use_ok( "Business::ISBN" ); - -foreach my $string ( @isbns ) - { - local $^W=0; - my $isbn = Business::ISBN->new( $string ); - isa_ok( $isbn, 'Business::ISBN10' ); - ok( $isbn->is_valid, "$isbn is valid" ); - - is( $isbn->_xisbn_url, - "http://xisbn.worldcat.org/xid/isbn/$string", - "URL is correct for $string" ); - - my $expected = $hash->{$isbn}; - - #scalar context - my $isbns = $isbn->xisbn; - isa_ok( $isbns, 'ARRAY' ); - my $count = grep { /$string/ } @$isbns; - is( $count, 0, "List does not contain $string" ); - eq_array( $isbns, $expected, "List is correct" ); - - #list context - my @isbns = $isbn->xisbn; - $count = grep { /$string/ } @isbns; - is( $count, 0, "List does not contain $string" ); - eq_array( \@isbns, $expected, "List is correct" ); - } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Business-ISBN-2.09/xt/changes.t new/Business-ISBN-3.002/xt/changes.t --- old/Business-ISBN-2.09/xt/changes.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Business-ISBN-3.002/xt/changes.t 2016-08-10 11:30:52.000000000 +0200 @@ -0,0 +1,4 @@ +use Test::More; +eval 'use Test::CPAN::Changes'; +plan skip_all => 'Test::CPAN::Changes required for this test' if $@; +changes_ok(); ++++++ cpanspec.yml ++++++ --- #description_paragraphs: 3 #description: |- # override description from CPAN #summary: override summary from CPAN #no_testing: broken upstream #sources: # - source1 # - source2 #patches: # foo.patch: -p1 # bar.patch: #preamble: |- # BuildRequires: gcc-c++ #post_prep: |- # hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` # sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL #post_build: |- # rm unused.files #post_install: |- # sed on %{name}.files #license: SUSE-NonFree #skip_noarch: 1 #custom_build: |- #./Build build flags=%{?_smp_mflags} --myflag #custom_test: |- #startserver && make test #ignore_requires: Bizarre::Module