| 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);
}
})
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);
}
})
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||