Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 35.262.297 Times

Data::Type 0.01.04

  Date Added: July 14, 2010  |  Visits: 942

Data::Type

Report Broken Link
Printer Friendly Version


Product Homepage
Download (86 downloads)



Data::Type is a Perl module with versatile data and value types. SYNOPSIS use Data::Type qw(:all); use Error qw(:try); try { verify $email , EMAIL; verify $homepage , URI(http); verify $cc , CREDITCARD( MASTERCARD, VISA ); verify $answer_a , YESNO; verify $gender , GENDER; verify one , ENUM( qw(one two three) ); verify [qw(two six)], SET( qw(one two three four five six) ) ); verify $server_ip4 , IP(v4); verify $server_ip6 , IP(v6); verify A35231AH1 , CINS; verify 14565935 , ISSN; verify DE , LANGCODE; verify German , LANGNAME; verify 012345678905, UPC(); verify 5276440065421319, CREDITCARD( MASTERCARD ) ); verify ATGCAAAT , BIO::DNA; verify AUGGGAAAU , BIO::RNA; verify 01001001110110101, BINARY; verify 0F 0C 0A, HEX; verify 0 , DEFINED; verify 234 , NUM( 20 ); verify 1 , BOOL( true ); verify 100 , INT; verify 1.1 , REAL; my $foo = bless( 123, SomeThing ); verify $foo , REF; verify $foo , REF( qw(SomeThing Else) ); verify [ bar ] , REF( ARRAY ); verify x 20 , VARCHAR( 20 ); verify 2001-01-01 , DATE( MYSQL ); verify 16 Nov 94 22:28:20 PST , DATE( DATEPARSE ); verify 9999-12-31 23:59:59, DATETIME; verify 1970-01-01 00:00:00, TIMESTAMP; verify -838:59:59 , TIME; verify 2155 , YEAR; verify 69 , YEAR(2); verify 0 x 20 , TINYTEXT; verify 0 x 20 , MEDIUMTEXT; verify 0 x 20 , LONGTEXT; verify 0 x 20 , TEXT; verify 80 , PORT; verify www.cpan.org, DOMAIN; } catch Type::Exception with { my $e = shift; printf "Expected %s %s at %s line %sn", $e->value, $e->type->info, $e->was_file, $e->was_line; foreach my $entry ( testplan( $e->type ) ) { printf "texpecting it %s %s ", $entry->[1] ? is : is NOT, $entry->[0]->info(); } }; # believe it or not, this really works foreach ( EMAIL, WORD, CREDITCARD( MASTERCARD, VISA ), BIO::DNA, HEX ) { print $_->info; print $_->usage; print $_->export; # does it have other names print $_->param; # what are my choice i.e. [yes,no] print $_->isa( IType::Business ); # is it a Business related type ? print $_->VERSION; # first apperance in Data::Type release } # tied interface (alias typ) try { typ ENUM( qw(DNA RNA) ), ( my $a, my $b ); print "a is typed" if istyp( $a ); $a = DNA; # $alias only accepts DNA or RNA $a = RNA; $a = xNA; # throws exception untyp( $alias ); } catch Type::Exception ::with { printf "Expected %s %s at %s line %sn", $e->value, $e->type->info, $e->was_file, $e->was_line; }; dverify( $email, EMAIL ) or die $!; my $g = Data::Type::Guard->new( allow => [ Human, Others ], # blessed objects of that type tests => { email => EMAIL( 1 ), # mxcheck ON ! see Email::Valid firstname => WORD, social_id => [ NUM, VARCHAR( 10 ) ], contacts => sub { my %args = @_; exists $args{lucy} }, } ); $g->inspect( $h ); # compact version overify { email => EMAIL( 1 ), firstname => WORD }, $object_a, $object_b; print toc(); print catalog(); This module supports versatile data and value types. Out of the ordinary it supports parameterised types (like databases have i.e. VARCHAR(80) ). When you try to feed a typed variable against some odd data, this module explains what he would have expected..

Requirements: No special requirements
Platforms: Linux
Keyword: Datatype Dna E- Email Libraries Perl Module Print Qw Rna Value Varchar Verify Word
Users rating: 0/10

License: Freeware Size: 22.53 KB
USER REVIEWS
More Reviews or Write Review


DATA::TYPE RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Net::DNS::ValueDomain::DDNS 0.02
Net::DNS::ValueDomain::DDNS is a Perl module to update your Value-Domain (https://www.value-domain.com/) DynamicDNS records. SYNOPSIS use Net::DNS::ValueDomain::DDNS; # Normal usage my $ddns = Net::DNS::ValueDomain::DDNS->new;...
11.26 KB  
Libraries  -  Scrape::USPS::ZipLookup Perl Module 2.4
The United States Postal Service (USPS) has on its web site an HTML form at http://www.usps.com/zip4/ for standardizing an address. Given a firm, urbanization, street address, city, state, and zip, it will put the address into standard form...
11.26 KB  
Mail Clients  -  Automatic Email Manager (formerly Automatic Print Email) 4.22 Build 4039
Automatic Email Manager monitors your e-mailbox and automatically detect new emails and applies the defined action(s) like printing email and/or attachments (file like FAX, PDF, Word, Excel, Photos, TIFF,... ), deleting email on server, backup...
 
Libraries  -  Test::Reporter::Date::Format 1.27
Test::Reporter::Date::Format Perl module contains date formating subroutines. SYNOPSIS use Test::Reporter::Date::Format; @lt = localtime(time); print time2str($template, time); print strftime($template, @lt); print time2str($template,...
23.55 KB  
Programming  -  Perl Module Manager 1.2.0.18
Perl Module Manager helps you to install, un-install and manage Perl modules from a CPAN site and other sources in an easy and intuitive way. Allows you to search through thousands of useful modules and libraries on a CPAN site and its mirrors....
1.44 MB  
Libraries  -  Math::Combinatorics 0.09
Math::Combinatorics is a Perl module that can perform combinations and permutations on lists. SYNOPSIS Available as an object oriented API. use Math::Combinatorics; my @n = qw(a b c); my $combinat = Math::Combinatorics->new(count => 2,...
10.24 KB  
Libraries  -  XML::All 0.02
XML::All is a Perl module that contains overloaded XML objects. SYNOPSIS use XML::All; Â my $xml = 1 2 3 >; Â print $$xml; # a print join ", ", @$xml; # 1, 2 , 3 print...
25.6 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB