NAME
MooseX::Types::GTIN - Moose types for Global Trade Identifiers.
SYNOPSIS
is_GTIN(829410333658);
# returns true
to_GTIN(
" 829410333658 "
);
# returns 829410333658
is_ISBN10(0974514055);
# returns true
to_GTIN(0974514055);
# returns 9780974514055
use
Moose;
has
barcode
=> (
is
=>
"rw"
,
isa
=> GTIN );
has
isbn
=> (
is
=>
"rw"
,
isa
=> ISBN10 );
DESCRIPTION
This package provides Moose types for "Global Trade Identifiers, also known as UPCs and EANs. 8, 12, 13 and 14 digital varients of GTINs are supported, along with 10 digit ISBN numbers. The checksum of GTINs are validated, ISBN numbers are only checked for the correct form.
SEE ALSO
AUTHOR
Dave Lambley <davel@state51.co.uk>, on behalf of his employer, http://www.state51.co.uk.