| 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
| |||||||||||
| 33 | . ( $self->is_inverted ? '^' : '' ) | ||||||||||
| 34 | . $self->_stringify_label( $self->tag ); | ||||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | __PACKAGE__->meta->make_immutable; | ||||||||||
| 38 | |||||||||||
| 39 | 1; | ||||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||