TPath/Test/Compound.pm

filter: Statementstmt 66.6% 4 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 6 / 8 CC 1 SCAR 1.4
CC
1
Cov
67%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
« TPath/Predicate/Expression.pm ↑ Summary TPath/TypeConstraints.pm »
1 package TPath::Test::Compound;
2 $TPath::Test::Compound::VERSION = '1.007';
3 # ABSTRACT: role of TPath::Tests that combine multiple other tests under some boolean operator
4  
5 4 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 0 ▶use TPath::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=2.6
7  
8  
9 with 'TPath::Test::Boolean';
10  
11  
12 has tests => ( is => 'ro', isa => 'ArrayRef[CondArg]', required => 1 );
13  
14 sub _compound_to_string {
15 my ( $self, $op ) = @_;
16 my $s = '(';
17 my @tests = @{ $self->tests };
18 $s .= $tests[0]->to_string;
19 for my $t ( @tests[ 1 .. $#tests ] ) {
20 $s .= " $op " . $t->to_string;
21 }
22 $s .= ')';
23 return $s;
24 }
25  
26 1;
27  
28 __END__
« TPath/Predicate/Expression.pm ↑ Summary TPath/TypeConstraints.pm »