Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Business-ISBN CPAN distribution.

Report information
The Basics
Id: 29292
Status: resolved
Priority: 0/
Queue: Business-ISBN

People
Owner: Nobody in particular
Requestors: lars [...] aronsson.se
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.02_04
Fixed in: (no value)



Subject: Bad hyphens in some ISBN-13 with Business::ISBN
Hi Ed and Brian, Is the following a known problem, and is there any fix? I'm having great fun with the CPAN package Business::ISBN, but it's odd that as_string() produces different results for 10-digit and 13-digit ISBNs. For example, it correctly suggests 91-7119-704-4 but then wrongly 978-91-711-9810-5. In both cases, 91-7 should be followed by three digits (91-7119-) before the next hyphen. The file Business/ISBN/Data.pm correctly states: 91 => [ 'Sweden', [ '0' => 1, 20 => 49, 500 => 649, 7000 => 7999, 85000 => 94999, 970000 => 999999 ] ], This works perfectly fine ISBN-10 and for 978-91-[0-6], but [789] are followed by just two more digits (e.g. -711-) before the next hyphen. It also wrongly suggests 978-0-8826-4180-5 (should be 0-88264-) and 978-0-9119-1000-1 (should be 0-911910-). It is as if it never puts the middle hyphen after the 8:th digit, which is a reasonable thing to do in an ISBN-10, but not in ISBN-13. Maybe the Perldoc line "Positions less than 1 and greater than 9 are silently ignored" for as_string() is the key to the problem? When we're dealing with ISBN-13s, these positions should be counted from the end of the string, not from the beginning. Here's my program: #!/usr/bin/perl -w use Business::ISBN; use strict; my $isbn = Business::ISBN->new("9789171198105"); my $pretty = $isbn->as_string; print "$pretty\n";
Hi Lars, I've tried this with the latest development version of ISBN and haven't seen this problem. Which version of Business::ISBN are you using?
Subject: Re: [rt.cpan.org #29292] Bad hyphens in some ISBN-13 with Business::ISBN
Date: Tue, 11 Sep 2007 21:31:45 +0200 (CEST)
To: brian_d_foy via RT <bug-Business-ISBN [...] rt.cpan.org>
From: Lars Aronsson <lars [...] aronsson.se>
Hi Brian, Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=29292 > > > Hi Lars, > > I've tried this with the latest development version of ISBN and > haven't seen this problem. Which version of Business::ISBN are > you using?
I installed it on August 21 with "cpan Business::ISBN" and it told me version 2.02. When I redo this now, it claims still to be up to date. ISBN.pm says: # $Id: ISBN.pm,v 2.6 2007/08/15 08:06:49 comdog Exp $ -- Lars Aronsson (lars@aronsson.se) Aronsson Datateknik - http://aronsson.se
Subject: Re: [rt.cpan.org #29292] Bad hyphens in some ISBN-13 with Business::ISBN
Date: Tue, 11 Sep 2007 17:40:30 -0500
To: bug-Business-ISBN [...] rt.cpan.org
From: "brian d foy" <brian.d.foy [...] gmail.com>
On 9/11/07, lars@aronsson.se via RT <bug-Business-ISBN@rt.cpan.org> wrote: Hi Lars, Try it with the latest development release of Business::ISBN, which you can get off CPAN (just try it with the module in the dev directory rather than installing it). Also, which version of Perl are you using? Which platform? Thanks, -- brian d foy <brian.d.foy@gmail.com> http://www.pair.com/~comdog/
Subject: Re: [rt.cpan.org #29292] Bad hyphens in some ISBN-13 withBusiness::ISBN
Date: Wed, 12 Sep 2007 01:53:49 +0200 (CEST)
To: brian_d_foy via RT <bug-Business-ISBN [...] rt.cpan.org>
From: Lars Aronsson <lars [...] aronsson.se>
Brian, the Sourceforge version of Business::ISBN works just fine, thanks! I should have checked this first. -- Lars Aronsson (lars@aronsson.se) Aronsson Datateknik - http://aronsson.se