Hello community,
here is the log from the commit of package perl-Business-ISMN for
openSUSE:Factory checked in at 2018-11-13 16:25:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Business-ISMN (Old)
and /work/SRC/openSUSE:Factory/.perl-Business-ISMN.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Business-ISMN"
Tue Nov 13 16:25:34 2018 rev:7 rq:647272 version:1.201
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Business-ISMN/perl-Business-ISMN.changes
2018-07-18 22:37:28.914234149 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Business-ISMN.new/perl-Business-ISMN.changes
2018-11-13 16:25:43.510657897 +0100
@@ -1,0 +2,10 @@
+Thu Nov 8 06:04:08 UTC 2018 - Stephan Kulow <[email protected]>
+
+- updated to 1.201
+ see /usr/share/doc/packages/perl-Business-ISMN/Changes
+
+ 1.201 2018-10-18T15:27:35Z
+ * Change publisher() to country() (because that's what it is).
+ The old method names are still there but carp.
+
+-------------------------------------------------------------------
Old:
----
Business-ISMN-1.132.tar.gz
New:
----
Business-ISMN-1.201.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Business-ISMN.spec ++++++
--- /var/tmp/diff_new_pack.WRh4K0/_old 2018-11-13 16:25:44.614656152 +0100
+++ /var/tmp/diff_new_pack.WRh4K0/_new 2018-11-13 16:25:44.622656140 +0100
@@ -12,18 +12,18 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-Business-ISMN
-Version: 1.132
+Version: 1.201
Release: 0
%define cpan_name Business-ISMN
Summary: Work with International Standard Music Numbers
License: Artistic-2.0
Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/Business-ISMN/
+Url: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/B/BD/BDFOY/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
@@ -42,7 +42,7 @@
%setup -q -n %{cpan_name}-%{version}
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
++++++ Business-ISMN-1.132.tar.gz -> Business-ISMN-1.201.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Business-ISMN-1.132/Changes
new/Business-ISMN-1.201/Changes
--- old/Business-ISMN-1.132/Changes 2018-07-14 02:59:23.000000000 +0200
+++ new/Business-ISMN-1.201/Changes 2018-10-18 17:28:13.000000000 +0200
@@ -1,5 +1,9 @@
Revision history for Perl module Business::ISMN
+1.201 2018-10-18T15:27:35Z
+ * Change publisher() to country() (because that's what it is).
+ The old method names are still there but carp.
+
1.132 2018-07-14T00:59:12Z
* Clarify that it's the Artistic License 2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Business-ISMN-1.132/META.json
new/Business-ISMN-1.201/META.json
--- old/Business-ISMN-1.132/META.json 2018-07-14 02:59:24.000000000 +0200
+++ new/Business-ISMN-1.201/META.json 2018-10-18 17:28:14.000000000 +0200
@@ -54,6 +54,6 @@
"web" : "https://github.com/briandfoy/business-ismn"
}
},
- "version" : "1.132",
+ "version" : "1.201",
"x_serialization_backend" : "JSON::PP version 2.27400_02"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Business-ISMN-1.132/META.yml
new/Business-ISMN-1.201/META.yml
--- old/Business-ISMN-1.132/META.yml 2018-07-14 02:59:23.000000000 +0200
+++ new/Business-ISMN-1.201/META.yml 2018-10-18 17:28:14.000000000 +0200
@@ -26,5 +26,5 @@
bugtracker: https://github.com/briandfoy/business-ismn/issues
homepage: https://github.com/briandfoy/business-ismn
repository: https://github.com/briandfoy/business-ismn.git
-version: '1.132'
+version: '1.201'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Business-ISMN-1.132/README.pod
new/Business-ISMN-1.201/README.pod
--- old/Business-ISMN-1.132/README.pod 2018-07-14 02:59:23.000000000 +0200
+++ new/Business-ISMN-1.201/README.pod 2018-10-18 17:28:13.000000000 +0200
@@ -10,7 +10,7 @@
=for HTML <a
href="https://github.com/briandfoy/business-ismn/blob/master/LICENSE"><img
src="https://img.shields.io/cpan/l/Business-ISMN.svg" /></a>
-=for HTML <a href="http://www.metacpan.org/module/Business::ISMN"><img
src="https://img.shields.io/cpan/v/Business-ISMN.svg" /></A>
+=for HTML <a href="https://metacpan.org/pod/Business::ISMN"><img
src="https://img.shields.io/cpan/v/Business-ISMN.svg" /></A>
=head1 The Business::ISMN module
@@ -23,7 +23,7 @@
To read about L<Business::ISMN>, 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>:
+with L<perldoc|https://perldoc.perl.orgperldoc.html>:
% perldoc lib/Business/ISMN.pm
@@ -33,7 +33,7 @@
% perldoc Business::ISMN
You can read the documentation and inspect the meta data at
-L<MetaCPAN|http://www.metacpan.org/module/Business::ISMN>.
+L<MetaCPAN|https://metacpan.org/pod/Business::ISMN>.
The standard module documentation has example uses in the SYNOPSIS
section, but you can also look in the I<examples/> directory (if it's
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Business-ISMN-1.132/lib/Business/ISMN.pm
new/Business-ISMN-1.201/lib/Business/ISMN.pm
--- old/Business-ISMN-1.132/lib/Business/ISMN.pm 2018-07-14
02:59:23.000000000 +0200
+++ new/Business-ISMN-1.201/lib/Business/ISMN.pm 2018-10-18
17:28:13.000000000 +0200
@@ -21,7 +21,7 @@
our @EXPORT_OK = qw(is_valid_checksum ean_to_ismn ismn_to_ean
INVALID_PUBLISHER_CODE BAD_CHECKSUM GOOD_ISMN BAD_ISMN);
-our $VERSION = '1.132';
+our $VERSION = '1.201';
sub INVALID_PUBLISHER_CODE { -3 };
sub BAD_CHECKSUM { -1 };
@@ -69,7 +69,7 @@
$self->{'positions'}[1] = $code_end;
- return $self unless $self->is_valid_publisher_code;
+ return $self unless $self->is_valid_country_code;
# we have a good publisher code, so
# assume we have a bad checksum until we check
@@ -88,7 +88,8 @@
# none of these take arguments
sub ismn () { my $self = shift; return $self->{'ismn'} }
sub is_valid () { my $self = shift; return $self->{'valid'} }
-sub publisher () { my $self = shift; return $self->{'publisher'} }
+sub country () { my $self = shift; return $self->{'country'} }
+sub publisher () { carp "publisher is deprecated. Use country
instead."; &country }
sub publisher_code () { my $self = shift; return $self->{'publisher_code'} }
sub article_code () { my $self = shift; return $self->{'article_code'} }
sub checksum () { my $self = shift; return $self->{'checksum'} }
@@ -155,7 +156,7 @@
return $ean;
}
-sub is_valid_publisher_code {
+sub is_valid_country_code {
my $self = shift;
my $code = $self->publisher_code;
@@ -167,7 +168,7 @@
last if $code < $tuple->[1];
if( $code >= $tuple->[1] and $code <= $tuple->[2] ) {
$success = 1;
- $self->{'publisher'} = $tuple->[0];
+ $self->{'country'} = $tuple->[0];
last;
}
}
@@ -175,6 +176,11 @@
return $success;
}
+sub is_valid_publisher_code {
+ carp "is_valid_publisher_code is deprecated. Use is_valid_country_code";
+ &is_valid_country_code
+ }
+
sub is_valid_checksum {
my $data = _common_format shift;
@@ -312,9 +318,9 @@
#this not does affect the default positions
print $ismn_object->as_string([]);
- #print the publisher or publisher code
- print $ismn->publisher;
- print $ismn->publisher_code;
+ #print the publication country or publisher code
+ print $ismn->country; # two letter country string
+ print $ismn->publisher_code; # digits
#check to see if the ISMN is valid
$ismn_object->is_valid;
@@ -393,14 +399,17 @@
Returns the ISMN as a string
+=item country
+
=item publisher
-Returns the country associated with the publisher code.
+Returns the country associated with the publisher code. This method was
+formerly called C<publisher> (and that still works), but it's really
+returns a two letter country code.
=item publisher_code
-Returns the publisher code or C<undef> if no publisher
-code was found.
+Returns the publisher code or C<undef> if no publisher code was found.
=item article_code
@@ -455,9 +464,14 @@
looking like a valid ISMN. This might include strings such as C<"abc">,
C<"123456">, and so on.
+=item is_valid_country_code
+
=item is_valid_publisher_code
-Returns true if the publisher code is valid, and false otherwise.
+Returns true if the country code is valid, and false otherwise.
+
+This method was formerly called C<is_valid_publisher_code>. That's
+deprecated but still there.
=item fix_checksum()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Business-ISMN-1.132/t/ismn.t
new/Business-ISMN-1.201/t/ismn.t
--- old/Business-ISMN-1.132/t/ismn.t 2018-07-14 02:59:23.000000000 +0200
+++ new/Business-ISMN-1.201/t/ismn.t 2018-10-18 17:28:13.000000000 +0200
@@ -1,40 +1,42 @@
-use Test::More tests => 18;
+use Test::More tests => 19;
use Business::ISMN;
-my $GOOD_ISMN = "M706208053";
-my $GOOD_ISMN_STRING = "M-706208-05-3";
-my $GOOD_EAN = "9790706208053";
-my $PUBLISHER = "706208";
-my $BAD_CHECKSUM_ISMN = "M706208057";
-my $BAD_PUBLISHER_ISMN = "M456922572";
+my $GOOD_ISMN = 'M706208053';
+my $GOOD_ISMN_STRING = 'M-706208-05-3';
+my $GOOD_EAN = '9790706208053';
+my $COUNTRY_STRING = 'LT';
+my $PUBLISHER_CODE = '706208';
+my $BAD_CHECKSUM_ISMN = 'M706208057';
+my $BAD_PUBLISHER_ISMN = 'M456922572';
my $NULL_ISMN = undef;
-my $NO_GOOD_CHAR_ISMN = "abcdefghij";
-my $SHORT_ISMN = "M156592";
+my $NO_GOOD_CHAR_ISMN = 'abcdefghij';
+my $SHORT_ISMN = 'M156592';
# test to see if we can construct an object?
my $ismn = Business::ISMN->new( $GOOD_ISMN );
isa_ok( $ismn, 'Business::ISMN' );
-is( $ismn->is_valid, Business::ISMN::GOOD_ISMN, "$GOOD_ISMN is valid" );
-is( $ismn->publisher_code, $PUBLISHER, "$GOOD_ISMN has right publisher");
-is( $ismn->as_string, $GOOD_ISMN_STRING, "$GOOD_ISMN stringifies correctly");
-is( $ismn->as_string([]), $GOOD_ISMN, "$GOOD_ISMN stringifies correctly");
+is( $ismn->is_valid, Business::ISMN::GOOD_ISMN, "$GOOD_ISMN is valid" );
+is( $ismn->country, $COUNTRY_STRING, "$GOOD_ISMN has publisher
string");
+is( $ismn->publisher_code, $PUBLISHER_CODE, "$GOOD_ISMN has right
publisher");
+is( $ismn->as_string, $GOOD_ISMN_STRING, "$GOOD_ISMN stringifies
correctly");
+is( $ismn->as_string([]), $GOOD_ISMN, "$GOOD_ISMN stringifies
correctly");
# and bad checksums?
$ismn = Business::ISMN->new( $BAD_CHECKSUM_ISMN );
isa_ok( $ismn, 'Business::ISMN' );
-is( $ismn->is_valid, Business::ISMN::BAD_CHECKSUM,
+is( $ismn->is_valid, Business::ISMN::BAD_CHECKSUM,
"$BAD_CHECKSUM_ISMN is invalid" );
#after this we should have a good ISMN
$ismn->fix_checksum;
-is( $ismn->is_valid, Business::ISMN::GOOD_ISMN,
+is( $ismn->is_valid, Business::ISMN::GOOD_ISMN,
"$BAD_CHECKSUM_ISMN had checksum fixed" );
# bad publisher code?
$ismn = Business::ISMN->new( $BAD_PUBLISHER_ISMN );
isa_ok( $ismn, 'Business::ISMN' );
-is( $ismn->is_valid, Business::ISMN::INVALID_PUBLISHER_CODE,
+is( $ismn->is_valid, Business::ISMN::INVALID_PUBLISHER_CODE,
"$BAD_PUBLISHER_ISMN is invalid" );
# convert to EAN?
@@ -65,25 +67,25 @@
SKIP:
{
my $file = "ismns.txt";
- open FILE, $file or
+ open FILE, $file or
skip( "Could not read $file: $!", 1, 'Need $file');
print STDERR "\nChecking ISMNs... (this may take a bit)\n";
-
+
my $bad = 0;
while( <FILE> )
{
chomp;
next unless /\S+/;
my $ismn = Business::ISMN->new( $_ );
-
+
my $result = $ismn->is_valid;
$bad++ unless $result eq Business::ISMN::GOOD_ISMN;
- print STDERR "$_ is not valid? [$result]\n"
- unless $result eq Business::ISMN::GOOD_ISMN;
+ print STDERR "$_ is not valid? [$result]\n"
+ unless $result eq Business::ISMN::GOOD_ISMN;
}
-
+
close FILE;
-
+
ok( $bad == 0, "Match ISMNs" );
}