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

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

Serving Software Downloads in 956 Categories, Downloaded 50.268.619 Times

Params::Validate 0.88

  Date Added: January 04, 2010  |  Visits: 835

Params::Validate

Report Broken Link
Printer Friendly Version


Product Homepage
Download (109 downloads)



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..

Requirements: No special requirements
Platforms: Linux
Keyword: Bar Foo Libraries Module Paramsvalidate Perl Module Programming Sub Type Validate
Users rating: 0/10

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


PARAMS::VALIDATE RELATED
Libraries  -  Template::Manual::Directives 2.19
Template::Manual::Directives is a Perl module that contains template directives. Accessing and Updating Template Variables GET The GET directive retrieves and outputs the value of the named variable. [% GET foo %] The GET keyword is...
778.24 KB  
Libraries  -  Scalar::Footnote 0.99_02
Scalar::Footnote is a Perl module that can attach hidden scalars to references. SYNOPSIS use Data::Dumper; use Scalar::Footnote; my $obj = Foo->new; # attach invisible footnote to $obj: $obj->Scalar::Footnote::set( my_key => my footnote...
9.22 KB  
Libraries  -  Class::Meta::Type 0.53
Class::Meta::Type is a Perl module for data type validation and accessor building. SYNOPSIS package MyApp::TypeDef; use strict; use Class::Meta::Type; use IO::Socket; my $type = Class::Meta::Type->add( key => io_socket, desc =>...
61.44 KB  
Utilities  -  Dylan Code Collection 1.7
A collection of useful libraries written in the Dylan programming language. The intent of this project is to provide easily accessible libraries for people developing applications using Functional Developer and/or Gwydion Dylan.
673.63 KB  
Programming  -  kin 0.0.2
kin is a set of libraries and tools supporting meta-programming for engineering and technical computing applications. This JVM version of kin has been superseded by the stand-alone version being developed at http://purl.org/net/kin.
477.44 KB  
Modules  -  relatedviews 1.0
You can use this module in this type of situation: You can define a block which contains a view. The view uses the filter "Taxonomy: Term from current node", and therefore the view will contain nodes that share taxonomy terms with the current node...
 
Libraries  -  Video::Info::FOO 0.993
Video::Info::FOO is a Perl module for video information. Video::Info::FOO - what is it useful for? an example list: -video codec -audio codec -frame height -frame width -frame count and more! SYNOPSIS use Video::Info::FOO; my...
634.88 KB  
Libraries  -  Class::XML 0.06
Class::XML is a Perl module for simple XML Abstraction. SYNOPSIS package Foo; use base qw/Class::XML/; __PACKAGE__->has_attributes(qw/length colour/); __PACKAGE__->has_child(bar => Bar); package Bar; use base qw/Class::XML/;...
18.43 KB  
Libraries  -  Drupal::Module::Starter 0.06
Drupal::Module::Starter is a Perl module to create Drupal Module starter files. SYNOPSIS You probably dont want to use this module directly - you want to use the drupal-module-starter script in the scripts directory of the distribution use...
14.34 KB  
Libraries  -  App::Modular::Module::Events 0.1.2
App::Modular::Module::Events is a Perl module with event handling for App::Modular compatible applications. SYNOPSIS #################################################################### package App::Modular::Module::Me; use base...
16.38 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