please dont rip this site

Datafile Isbn BUSINESS-ISBN-1


Business::ISBN - work with International Standard Book Numbers


	use Business::ISBN;
	$isbn_object = new Business::ISBN('1565922573');
	$isbn_object = new Business::ISBN('1-56592-257-3');
	#print the ISBN with hyphens at positions specified #by
	constructor print $isbn_object->as_string;
	#print the ISBN with hyphens at specified positions. #this
	not does affect the default positions print
	#print the country code, country, or publisher code print
	$isbn->country_code; print $isbn->country; print
	#check to see if the ISBN is valid $isbn_object->is_valid;
	#fix the ISBN checksum.  BEWARE:  the error might not be #in
	the checksum! $isbn_object->fix_checksum;



The constructor accepts a scalar representing the ISBN.

The string representing the ISBN may contain characters
other than [0-9xX], although these will be removed in the
internal representation.  The resulting string must look
like an ISBN - the first nine characters must be digits and
the tenth character must be a digit, 'x', or 'X'.

The constructor attempts to determine the country code and
the publisher code based on data from .  If these data
cannot be determined, the constructor returns an error

	-3 Could not determine publisher code 
	-2 Could not determinecountry code 
	-1 ISBN is not valid

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 fix_checksum() method.  Despite the disclaimer in
the discussion of that method, the author has found it
extremely useful.  One should check the validity of the ISBN
with is_valid() rather than relying on the return value of
the constructor.

If the constructor decides it can't create an object, it
returns undef.  It may do this if the string passed as the
ISBN can't be munged to the internal format.


Returns the publisher code.


Returns the country code.


Returns the country designation associated with the country


Returns the list of hyphen positions as determined from the
country and publisher codes.  the as_string method provides
a way to temporarily override these positions and to even
forego them altogether.

$obj->as_string(),  $obj->as_string([])

Return the ISBN as a string.  This function takes an
optional anonymous array (or array reference) that specifies
the placement of hyphens in the string.  An empty list
produces a string with no hyphens.

The positions specified in the passed anonymous array are
only used for one method use and do not replace the values
specified by the constructor.

Positions less than 1 and greater than 9 are silently

A terminating 'x' is changed to 'X'.


Returns 1 if the checksum is valid and the country and
publisher codes are defined.

Returns -1 if the ISBN does not pass the checksum test, and
1 if it does.  The constructor accepts invalid ISBN's so
that they might be fixed with fix_checksum.

Returns -2 if a country code could not be determined (relies
on a valid checksum).

Returns -3 if a publisher code could not be determined
(relies on a valid checksum and country code).


Replace the tenth character with the checksum the
corresponds to the previous nine digits.  This does not
guarantee that the ISBN corresponds to the product one
thinks it does, or that the ISBN corresponds to any product
at all.  It only produces a string that passes the checksum
routine.  If the ISBN passed to the constructor was invalid,
the error might have been in any of the other nine


brian d foy <>

please see <> for
guidelines on proper attribution.

The coding of this module was supported by Smith Renaud,
Inc. <> and released under the
terms of the Perl Artistic License.

Country code and publisher code graciously provided by Steve
Fisher <> of Whitaker (the UK ISBN folks
and the major bibliographic data provider in the UK).
"Whitaker - helping to link authors to readers worldwide"

Thanks to Julie Koo of Kaya Publishing
<> for useful discussions.

file: /Techref/datafile/isbn/business-isbn-1.0/readme.txt, 4KB, , updated: 1998/3/28 22:06, local time: 2018/6/20 23:19,

 ©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE! / 

<A HREF=""> datafile isbn business-isbn-1</A>

Did you find what you needed?


Welcome to!

Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.

Welcome to!