Sub::Contract::ArgumentChecks - Hold the constraints on input/return arguments
See 'Sub::Contract'.
An instance of Sub::Contract::ArgumentChecks holds the constraints for either the input arguments or the return results of a given subroutine.
Subroutine arguments in perl can be passed as a list of values, or as a hash, or as a list mixing both values and hash. In fact arguments are always passed as a list but the elements of this list might have to be considered as members of a hash after a given position in the list.
An instance of Sub::Contract::ArgumentChecks describe the contract conditions on any optional heading list arguments and any optional trailing hash arguments in a list of input or return values.
Add a check for an argument passed in list-style. The order of calling add_list_check defines the position of that argument in the list.
add_list_check
Add a check for an argument passed in hash-style. The number of calls made to add_list_check defines where the hash starts in the list of arguments.
Return true if there are conditions on arguments passed in list-style.
Return true if there are conditions on arguments passed in hash-style.
$Id: ArgumentChecks.pm,v 1.8 2009/06/16 12:23:58 erwan_lemonnier Exp $
Erwan Lemonnier <erwan@cpan.org>
<erwan@cpan.org>
See Sub::Contract.
To install Sub::Contract, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Contract
CPAN shell
perl -MCPAN -e shell install Sub::Contract
For more information on module installation, please visit the detailed CPAN module installation guide.