TPath/Selector/Test/AnywhereTag.pm

filter: Statementstmt 64.2% 9 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 57.1% 12 / 21 CC 2 SCAR 10.4
CC
2
Cov
56%
to_string
6.0
BUILD
2.0
BEGIN
1.0
CRAP 2.8
« TPath/Selector/Test/AnywhereMatch.pm ↑ Summary demo.pl »
1 package TPath::Selector::Test::AnywhereTag;
2 $TPath::Selector::Test::AnywhereTag::VERSION = '1.007';
3 # ABSTRACT: handles C<//foo> expression
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use TPath::Test::Node::Tag;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9  
10 with 'TPath::Selector::Test';
11  
12 has tag => ( is => 'ro', isa => 'Str', required => 1 );
13  
14 around BUILDARGS => sub {
15 my ( $orig, $class, %args ) = @_;
16 $class->$orig(
17 %args,
18 first_sensitive => 1,
19 axis => 'descendant',
20 );
21 };
22  
23 0 ▶sub BUILD {
Subroutine BUILD: not called CC=1 SCAR=6.9
24 0 my $self = shift;
25 0 my $nt = TPath::Test::Node::Tag->new( tag => $self->tag );
26 0 $self->_node_test($nt);
27 }
28  
29 0 ▶sub to_string {
Subroutine to_string: not called CC=2 SCAR=17.9
30 0 my $self = shift;
31 return
32 0 ▶ '//'
Branch: 1 branch
BranchTrueFalseTotal
$self->is_inverted ? : 0 0 0
33 . ( $self->is_inverted ? '^' : '' )
34 . $self->_stringify_label( $self->tag );
35 }
36  
37 __PACKAGE__->meta->make_immutable;
38  
39 1;
40  
41 __END__
« TPath/Selector/Test/AnywhereMatch.pm ↑ Summary demo.pl »