Data::Type::Collection::Std - the standard set of data types
valid '0F 0C 0A', STD::HEX; valid '0', STD::DEFINED; valid '234', STD::NUM( 20 ); valid '1', STD::BOOL( 'true' ); valid '100', STD::INT; valid '1.01', STD::REAL; valid $email, STD::EMAIL; valid $homepage, STD::URI('http'); valid $cc, STD::CREDITCARD( 'MASTERCARD', 'VISA' ); valid $answer_a, STD::YESNO; valid $gender, STD::GENDER; valid 'one', STD::ENUM( qw(one two three) ); valid [qw(two six)], STD::SET( qw(one two three four five six) ) ); valid $server_ip4, STD::IP('v4'); valid $server_ip6, STD::IP('v6'); valid 'A35231AH1', STD::CINS; valid '14565935', STD::ISSN; valid 'DE', STD::LANGCODE; valid 'German', STD::LANGNAME; valid '012345678905', STD::UPC(); valid '5276440065421319', STD::CREDITCARD( 'MASTERCARD' ) ); my $foo = bless( \'123', 'SomeThing' ); valid $foo, STD::REF; valid $foo, STD::REF( qw(SomeThing Else) ); valid [ 'bar' ], STD::REF( 'ARRAY' ); valid '80', STD::PORT; valid 'www.cpan.org', STD::DOMAIN; valid '<pre>hello</pre><br>', STD::HTML; valid '<field>hello</field>', STD::XML;
binary code
Set of ( [0|1] )
boolean value
CINS
strip \s
i.e. 035231AH2
Business::CINS
country code
Locale::SubCountry
country name
creditcard
strip \D
CREDITCARD( Set of [MASTERCARD|AMEX|DISCOVER|BANKCARD|BLACHE|VISA|JCB|DINERS], .. )
Business::CreditCard
date
DATE employs Date::Parse str2time function.
Date::Parse
defined value
domain name
email address
[MXCHECK as STD::BOOL] MXCHECK results actually tests the mx host via internet (see Email::Valid)
Email::Valid
human gender
String
Set of ( ([0-9a-fA-F]) )
html markup
( 'structure' (default) | 'fluff' | 'helper' ) They are derived from the HTML::Lint->new() parameters (see HTML::Lint::Error)
HTML::Lint
integer
Regexp::Common
IP (v4 or v6) or MAC network address
Regexp::Common, Net::IPv6Addr
ISSN
example: 14565935
Business::ISSN
language code
Locale::Language
natural language
number
path
file containing Pod instructions
POD() requires a filename value
Pod::Find
tcp port number
quoted string
real
perl reference
country region code
country region
file containing a she-bang (#!)
( SIGNATURE [, SIGNATURE] ) - SIGNATURE is a text fragment (default: perl)
UPC
i.e. 012345678905
Business::UPC
uri
word (without whitespaces)
X.500 DN (Distinguished Name)
()
X500::DN
xml markup
XML::Parser
primitiv answer
zip code
ZIP( "DE" | "AU" | "DK" | "NL" | "US" | "BE" | "FR" )
Sourceforge http://sf.net/projects/datatype is hosting a project dedicated to this module. And I enjoy receiving your comments/suggestion/reports also via http://rt.cpan.org or http://testers.cpan.org.
Murat Uenalan, <muenalan@cpan.org>
To install Data::Type, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Type
CPAN shell
perl -MCPAN -e shell install Data::Type
For more information on module installation, please visit the detailed CPAN module installation guide.