Params::Validate 0.88
Sponsored Links
Params::Validate 0.88 Ranking & Summary
File size:
0.078 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
931
Date added:
2007-04-11
Publisher:
Dave Rolsky and Ilya Martynov
Params::Validate 0.88 description
Params::Validate is a Perl module to validate method/function parameters.
SYNOPSIS
use Params::Validate qw(:all);
# takes named params (hash or hashref)
sub foo
{
validate( @_, { foo => 1, # mandatory
bar => 0, # optional
}
);
}
# takes positional params
sub bar
{
# first two are mandatory, third is optional
validate_pos( @_, 1, 1, 0 );
}
sub foo2
{
validate( @_,
{ foo =>
# specify a type
{ type => ARRAYREF },
bar =>
# specify an interface
{ can => [ print, flush, frobnicate ] },
baz =>
{ type => SCALAR, # a scalar ...
# ... that is a plain integer ...
regex => qr/^d+$/,
callbacks =>
{ # ... and smaller than 90
less than 90 => sub { shift() < 90 },
},
}
}
);
}
sub with_defaults
{
my %p = validate( @_, { foo => 1, # required
# $p{bar} will be 99 if bar is not
# given. bar is now optional.
bar => { default => 99 } } );
}
sub pos_with_defaults
{
my @p = validate_pos( @_, 1, { default => 99 } );
}
sub sets_options_on_call
{
my %p = validate_with
( params => @_,
spec => { foo => { type SCALAR, default => 2 } },
normalize_keys => sub { $_[0] =~ s/^-//; lc $_[0] },
);
}
The Params::Validate module allows you to validate method or function call parameters to an arbitrary level of specificity. At the simplest level, it is capable of validating the required parameters were given and that no unspecified additional parameters were passed in.
It is also capable of determining that a parameter is of a specific type, that it is an object of a certain class hierarchy, that it possesses certain methods, or applying validation callbacks to arguments.
SYNOPSIS
use Params::Validate qw(:all);
# takes named params (hash or hashref)
sub foo
{
validate( @_, { foo => 1, # mandatory
bar => 0, # optional
}
);
}
# takes positional params
sub bar
{
# first two are mandatory, third is optional
validate_pos( @_, 1, 1, 0 );
}
sub foo2
{
validate( @_,
{ foo =>
# specify a type
{ type => ARRAYREF },
bar =>
# specify an interface
{ can => [ print, flush, frobnicate ] },
baz =>
{ type => SCALAR, # a scalar ...
# ... that is a plain integer ...
regex => qr/^d+$/,
callbacks =>
{ # ... and smaller than 90
less than 90 => sub { shift() < 90 },
},
}
}
);
}
sub with_defaults
{
my %p = validate( @_, { foo => 1, # required
# $p{bar} will be 99 if bar is not
# given. bar is now optional.
bar => { default => 99 } } );
}
sub pos_with_defaults
{
my @p = validate_pos( @_, 1, { default => 99 } );
}
sub sets_options_on_call
{
my %p = validate_with
( params => @_,
spec => { foo => { type SCALAR, default => 2 } },
normalize_keys => sub { $_[0] =~ s/^-//; lc $_[0] },
);
}
The Params::Validate module allows you to validate method or function call parameters to an arbitrary level of specificity. At the simplest level, it is capable of validating the required parameters were given and that no unspecified additional parameters were passed in.
It is also capable of determining that a parameter is of a specific type, that it is an object of a certain class hierarchy, that it possesses certain methods, or applying validation callbacks to arguments.
Params::Validate 0.88 Screenshot
Params::Validate 0.88 Keywords
Validate 0.88
to validate
Perl module
validate
sub
bar
parameters
type
module
Params::Validate
ParamsValidate
Params::Validate 0.88
Libraries
Programming
Bookmark Params::Validate 0.88
Params::Validate 0.88 Copyright
WareSeeker periodically updates pricing and software information of Params::Validate 0.88 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Params::Validate 0.88 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
validate office
validate xp
validate vista
validate html
validate windows vista
validate form
how do i validate a website
validate windows xp professional
perl modules
validate email
validate uk
mujeres desnusdas videos search parameters
validated
how to validate my windows for updates
validate data
validate css
parameters definition
validated short film
Related Software
PEAR Validate is a set of useful methods to validate various kinds of data. Free Download
Params-Util is a simple, compact and correct param-checking functions. Free Download
Params::Profile is a Perl module for registering Parameter profiles. Free Download
XML::Validator::Schema is a Perl module to validate XML against a subset of W3C XML Schema. Free Download
Perl6::Parameters is a module with Perl 6-style prototypes with named parameters. Free Download
Class::Phrasebook is a Perl module that implements the Phrasebook pattern. Free Download
Slauth is a Perl-based authentication and authorization module for Apache HTTPD 2. Free Download
Net::Amazon::Validate::ItemSearch is a Perl module to validate ItemSearch requests. Free Download
Latest Software
Popular Software
Favourite Software