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: 95357
Status: rejected
Priority: 0/
Queue: Business-ISBN

People
Owner: Nobody in particular
Requestors: hesco [...] campaignfoundations.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.07
Fixed in: (no value)



Subject: $isbn13->as_string([]) strips off checksum
Perhaps I do not understand how this is supposed to work, but I'd guess it should not work like this. #!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use lib qw{ local/lib/perl5 }; use Business::ISBN; print 'version: ' . $Business::ISBN::VERSION . "\n"; my $isbn_raw = '0-688-08510-5'; my $isbn_obj = Business::ISBN->new( $isbn_raw ); my $isbn13 = $isbn_obj->as_isbn13; # ->as_string( [] )->fix_checksum; print Dumper( $isbn_obj, $isbn13, $isbn13->as_string([]) ); exit; yields -- $ perl test.pl version: 2.07 $VAR1 = bless( { 'common_data' => '0688085105', 'publisher_code' => '688', 'group_code' => '0', 'input_isbn' => '0-688-08510-5', 'valid' => 1, 'checksum' => '5', 'type' => 'ISBN10', 'isbn' => '0688085105', 'article_code' => '08510', 'prefix' => '' }, 'Business::ISBN10' ); $VAR2 = bless( { 'common_data' => '9780688085105', 'publisher_code' => '688', 'group_code' => '0', 'input_isbn' => '9780688085105', 'valid' => 1, 'checksum' => 0, 'type' => 'ISBN13', 'isbn' => '9780688085100', 'article_code' => '08510', 'prefix' => '978' }, 'Business::ISBN13' ); $VAR3 = '9780688085100'; I was expecting to see: '9780688085105', instead. -- Hugh Esco
When you look at the ISBNs assigned to that book, you'll see you are getting the right result. The checksum of the ISBN-10 will not be the checksum of the ISBN-13 necessarily. http://www.alibris.com/search/books/isbn/9780688085100