Dave Lambley > MooseX-Types-GTIN > MooseX::Types::GTIN

Download:
MooseX-Types-GTIN-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

MooseX::Types::GTIN

SYNOPSIS ^

    use MooseX::Types::GTIN qw/ GTIN ISBN10 /;

    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 ^

syntax highlighting: