Declare::Constraints::Simple::Library::Array man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

Declare::Constraints::UserlContDeclare::Constraints::Simple::Library::Array(3)

NAME
       Declare::Constraints::Simple::Library::Array - Array Constraints

SYNOPSIS
	 # accept a list of pairs
	 my $pairs_validation = IsArrayRef( HasArraySize(2,2) );

	 # integer => object pairs
	 my $pairs = And( OnEvenElements(IsInt),
			  OnOddElements(IsObject) );

	 # a three element array
	 my $tri = And( HasArraySize(3,3),
			OnArrayElements(0, IsInt,
					1, IsDefined,
					2, IsClass) );

DESCRIPTION
       This module contains all constraints that can be applied to array
       references.

CONSTRAINTS
   HasArraySize([$min, [$max]])
       With $min defaulting to 1. So a specification of

	 my $profile = HasArraySize;

       checks for at least one value. To force an exact size of the array,
       specify the same values for both:

	 my $profile = HasArraySize(3, 3);

   OnArrayElements($key => $constraint, $key => $constraint, ...)
       Applies the the $constraints to the corresponding $keys if they are
       present. For required keys see "HasArraySize".

   OnEvenElements($constraint)
       Runs the constraint on all even elements of an array. See also
       "OnOddElements".

   OnOddElements($constraint)
       Runs the constraint on all odd elements of an array. See also
       "OnEvenElements".

SEE ALSO
       Declare::Constraints::Simple, Declare::Constraints::Simple::Library

AUTHOR
       Robert 'phaylon' Sedlacek "<phaylon@dunkelheit.at>"

LICENSE AND COPYRIGHT
       This module is free software, you can redistribute it and/or modify it
       under the same terms as perl itself.

perl v5.14.1		       Declare::Constraints::Simple::Library::Array(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net