| 1 | package TPath::Selector::Test::ChildTag; | ||||||||||
| 2 | $TPath::Selector::Test::ChildTag::VERSION = '1.007'; | ||||||||||
| 3 | # ABSTRACT: handles C</foo> where this is not the first step in the path, or C<child::foo> | ||||||||||
| 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 | 0 | ▶ | sub BUILD { | ||||||||
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
| |||||||||||
| 15 | 0 | my $self = shift; | |||||||||
| 16 | 0 | $self->_node_test( TPath::Test::Node::Tag->new( tag => $self->tag ) ); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub to_string { | ||||||||
|
Subroutine
to_string: not called CC=3 SCAR=24.8
| |||||||||||
| 20 | 0 | my ( $self, $first ) = @_; | |||||||||
| 21 | 0 | ▶ | my $s = $first ? '' : '/'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | ▶ | $s .= '^' if $self->is_inverted; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 0 | $s .= $self->_stringify_label( $self->tag, $first ); | |||||||||
| 24 | 0 | return $s; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | __PACKAGE__->meta->make_immutable; | ||||||||||
| 28 | |||||||||||
| 29 | 1; | ||||||||||
| 30 | |||||||||||
| 31 | __END__ | ||||||||||