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: 4916
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Business-ISBN

People
Owner: bdfoy [...] cpan.org
Requestors: ed [...] litmusgreen.com
Cc:
AdminCc:

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



CC: Andy Lester <andy [...] petdance.com>
From: Ed Silva <ed [...] litmusgreen.com>
Subject: Whitespace accepted in ISBN as valid
Date: Mon, 12 Jan 2004 11:55:50 -0600
To: bug-business-isbn [...] rt.cpan.org
If an ISBN object is created with an ISBN that has embedded whitespace it will validate: #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use Business::ISBN; my $isbn = new Business::ISBN('1-57 076-2 19-8'); print Dumper($isbn); # will be valid... exit(0); Yours, --Ed Silva
RT-Send-CC: andy [...] petdance.com
[ed@litmusgreen.com - Mon Jan 12 12:55:57 2004]: Show quoted text
> If an ISBN object is created with an ISBN that has embedded whitespace > it will validate:
Yes, that is correct, and it is documented in the explanation for new(). The new() method accepts a variety of formats because that is what I found in the real world. I originally wrote this module to take a bunch of hand-typed ISBNs, validate them, then spit out the correct format. Some original input had hyphens, some spaces, and some even had goofy 8-bit characters. Does this cause a problem for you? You could always check the input against the output to see if they were the same if that is what you are worried about.