Test::Proto::ArrayRef - Prototype with methods for arrayrefs
use Test::Proto::ArrayRef; my $pAr = Test::Proto::ArrayRef->new(); $pAr->in_groups_of(2, [['a','b'],['c','d']]); $pAr->ok([qw(a b c d)]);
Use this class for validating arrays, arrayrefs and lists. If you have arrays or lists, you must put them in a reference first.
All methods are provided by Test::Proto::Base or Test::Proto::Role::ArrayRef.
Remember that you are dealing with array references here:
pArray->num_gt(1)->validate( [] )
will not test the number of elements, it will do
[] > 1
not @{[]} > 1
For author, version, bug reports, support, etc, please see Test::Proto.
To install Test::Proto, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Proto
CPAN shell
perl -MCPAN -e shell install Test::Proto
For more information on module installation, please visit the detailed CPAN module installation guide.