TPath/Test/Node/Complement.pm

filter: Statementstmt 70.5% 12 / 17 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 1 totaltotal 48.2% 14 / 29 CC 3 SCAR 14.7
CC
3
Cov
55%
passes
6.0
__ANON__
6.0
BEGIN
1.0
CRAP 4.3
« TPath/Selector/Test/ChildTag.pm ↑ Summary TPath/Numifiable.pm »
1 package TPath::Test::Node::Complement;
2 1 $TPath::Test::Node::Complement::VERSION = '1.007';
3 # ABSTRACT: L<TPath::Test::Node> implementing matching; e.g., C<//^~foo~>, C<//^foo>, and C<//^@foo>
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 1 with 'TPath::Test::Node';
10  
11  
12 1 has nt => ( is => 'ro', isa => 'TPath::Test::Node', required => 1 );
13  
14 1 has _cr => ( is => 'rw', isa => 'CodeRef' );
15  
16 # required by TPath::Test::Node
17 0 ▶sub passes {
Subroutine passes: not called CC=2 SCAR=17.9
Pod undocumented
18 return (
19 0 ▶ $_[0]->_cr // do {
Condition0%0/3
$_[0]->_cr // do { my $nt = $_[0]->nt; my $passes = $nt->can("passes"); $_[0]->_cr(sub { &$passes($nt, $_[0]) ? undef : 1; } ) }
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[0]->_cr // do { my $nt = $_[0]->nt; my $passes = $nt->can("passes"); $_[0]->_cr(sub { &$passes($nt, $_[0]) ? undef : 1; } ) }
$_[0]->_cr do { my $nt = $_[0]->nt; my $passes = $nt->can("passes"); $_[0]->_cr(sub { &$passes($nt, $_[0]) ? undef : 1; } ) }
Truth table0%0/3
A // B
A= $_[0]->_crB= do { my $nt = $_[0]->nt; my $passes = $nt->can("passes"); $_[0]->_cr(sub { &$passes($nt, $_[0]) ? undef : 1; } ) }
ABresult
1X1
011
000
20 0 my $nt = $_[0]->nt;
21 0 my $passes = $nt->can('passes');
22 0 ▶ $_[0]->_cr( sub { $passes->( $nt, $_[0] ) ? undef : 1 } );
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
&$passes($nt, $_[0]) ? : 0 0 0
23 }
24 )->( $_[1] );
25  
26 # my ( $self, $ctx ) = @_;
27 # return $_[0]->nt->passes( $_[1] ) ? undef : 1;
28 }
29  
30 1 __PACKAGE__->meta->make_immutable;
31  
32 1 1;
33  
34 __END__
« TPath/Selector/Test/ChildTag.pm ↑ Summary TPath/Numifiable.pm »