TPath/Test/Not.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« TPath/Selector/Test/ClosestAttribute.pm ↑ Summary TPath/Attribute.pm »
1 package TPath::Test::Not;
2 $TPath::Test::Not::VERSION = '1.007';
3 # ABSTRACT: implements logical negation of a test
4  
5  
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use TPath::Test;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 0 ▶use TPath::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=2.6
9  
10  
11 with 'TPath::Test::Boolean';
12  
13  
14 has t => ( is => 'ro', isa => 'CondArg', required => 1 );
15  
16 # required by TPath::Test
17 sub test {
18 my ( $self, $ctx ) = @_;
19 return $self->t->test($ctx) ? 0 : 1;
20 }
21  
22 sub to_string {
23 my $self = shift;
24 return '!' . $self->t->to_string;
25 }
26  
27 __PACKAGE__->meta->make_immutable;
28  
29 1;
30  
31 __END__
« TPath/Selector/Test/ClosestAttribute.pm ↑ Summary TPath/Attribute.pm »