Proto/ArrayRef.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Proto/CodeRef.pm ↑ Summary Proto/HashRef.pm »
1 package Test::Proto::ArrayRef;
2 11 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 11 extends 'Test::Proto::Base';
7 11 with( 'Test::Proto::Role::Value', 'Test::Proto::Role::ArrayRef' );
8  
9 =head1 NAME
10  
11 Test::Proto::ArrayRef - Prototype with methods for arrayrefs
12  
13 =head1 SYNOPSIS
14  
15 use Test::Proto::ArrayRef;
16 my $pAr = Test::Proto::ArrayRef->new();
17 $pAr->in_groups_of(2, [['a','b'],['c','d']]);
18 $pAr->ok([qw(a b c d)]);
19  
20 Use this class for validating arrays, arrayrefs and lists. If you have arrays or lists, you must put them in a reference first.
21  
22 =head1 METHODS
23  
24 All methods are provided by L<Test::Proto::Base> or L<Test::Proto::Role::ArrayRef>.
25  
26 =head1 CAUTION
27  
28 Remember that you are dealing with array references here:
29  
30 pArray->num_gt(1)->validate( [] )
31  
32 will not test the number of elements, it will do
33  
34 [] > 1
35  
36 not
37 @{[]} > 1
38  
39 =head1 OTHER INFORMATION
40  
41 For author, version, bug reports, support, etc, please see L<Test::Proto>.
42  
43 =cut
44  
45 11 1;
« Proto/CodeRef.pm ↑ Summary Proto/HashRef.pm »