| 1 | package TPath::Selector::Test::AxisMatch; | ||||||||||
| 2 | $TPath::Selector::Test::AxisMatch::VERSION = '1.007'; | ||||||||||
| 3 | # ABSTRACT: handles C</ancestor::~foo~> or C</preceding::~foo~> where this is not the first step in the path, or C<ancestor::~foo~>, etc. | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use TPath::Test::Node::Match; | ||||||||
|
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::Match'; | ||||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub BUILD { | ||||||||
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
| |||||||||||
| 13 | 0 | my $self = shift; | |||||||||
| 14 | 0 | $self->_node_test( TPath::Test::Node::Match->new( rx => $self->rx ) ); | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub to_string { | ||||||||
|
Subroutine
to_string: not called CC=3 SCAR=24.8
| |||||||||||
| 18 | 0 | my ( $self, $first ) = @_; | |||||||||
| 19 | 0 | ▶ | my $s = $first ? '' : '/'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | $s .= $self->axis . '::'; | |||||||||
| 21 | 0 | ▶ | $s .= '^' if $self->is_inverted; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | $s .= $self->_stringify_match( $self->val ); | |||||||||
| 23 | 0 | return $s; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | __PACKAGE__->meta->make_immutable; | ||||||||||
| 27 | |||||||||||
| 28 | 1; | ||||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||