TPath/Test/Node/Match.pm

filter: Statementstmt 66.6% 12 / 18 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 1 totaltotal 50.0% 14 / 28 CC 2 SCAR 11.6
CC
2
Cov
57%
passes
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 3.2
« TPath/Selector/Id.pm ↑ Summary TPath/Test/Node/Tag.pm »
1 package TPath::Test::Node::Match;
2 5 $TPath::Test::Node::Match::VERSION = '1.007';
3 # ABSTRACT: L<TPath::Test::Node> implementing matching; e.g., C<//~foo~>
4  
5 5 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 5 with 'TPath::Test::Node';
10  
11  
12 5 has rx => ( is => 'ro', isa => 'RegexpRef', required => 1 );
13  
14 5 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  
19 # my ( $self, $ctx ) = @_;
20 (
21 $_[0]->_cr // $_[0]->_cr(
22 0 ▶ do {
Condition0%0/3
$_[0]->_cr // $_[0]->_cr(do { my $f = $_[1]->i->f; my $rx = $_[0]->rx; my $sr = $f->can("matches_tag"); sub { &$sr($f, $_[0], $rx); } })
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[0]->_cr // $_[0]->_cr(do { my $f = $_[1]->i->f; my $rx = $_[0]->rx; my $sr = $f->can("matches_tag"); sub { &$sr($f, $_[0], $rx); } })
$_[0]->_cr $_[0]->_cr(do { my $f = $_[1]->i->f; my $rx = $_[0]->rx; my $sr = $f->can("matches_tag"); sub { &$sr($f, $_[0], $rx); } })
Truth table0%0/3
A // B
A= $_[0]->_crB= $_[0]->_cr(do { my $f = $_[1]->i->f; my $rx = $_[0]->rx; my $sr = $f->can("matches_tag"); sub { &$sr($f, $_[0], $rx); } })
ABresult
1X1
011
000
23 0 my $f = $_[1]->i->f;
24 0 my $rx = $_[0]->rx;
25 0 my $sr = $f->can('matches_tag');
26 0 ▶ sub { $sr->( $f, $_[0], $rx ) };
Subroutine __ANON__: not called CC=1 SCAR=6.9
27 }
28 )
29 )->( $_[1][0] );
30 }
31  
32 5 __PACKAGE__->meta->make_immutable;
33  
34 5 1;
35  
36 __END__
« TPath/Selector/Id.pm ↑ Summary TPath/Test/Node/Tag.pm »