| 1 | package TPath::Selector::Id; | ||||||||||||||||||||
| 2 | 1 | $TPath::Selector::Id::VERSION = '1.007'; | |||||||||||||||||||
| 3 | # ABSTRACT: C<TPath::Selector> that implements C<id(foo)> | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | ▶ | use namespace::autoclean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 1 | with 'TPath::Selector'; | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 1 | has id => ( isa => 'Str', is => 'ro', required => 1 ); | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | # required by TPath::Selector | ||||||||||||||||||||
| 14 | 0 | ▶ | sub select { | ||||||||||||||||||
|
Subroutine
select: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 15 | 0 | my ( $self, $ctx ) = @_; | |||||||||||||||||||
| 16 | 0 | my $n = $ctx->i->indexed->{ $self->id }; | |||||||||||||||||||
| 17 | 0 | ▶ | $ctx->bud($n) // (); | ||||||||||||||||||
|
Condition0%0/3
$ctx->bud($n) // ()
MC/DC0%0/2
$ctx->bud($n) // ()
$ctx->bud($n)
()
Truth table0%0/3
A // B
A= $ctx->bud($n)B= ()
| |||||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 0 | ▶ | sub to_string { | ||||||||||||||||||
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 21 | 0 | my $self = shift; | |||||||||||||||||||
| 22 | 0 | return ':id(' . $self->_escape( $self->id, ')' ) . ')'; | |||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 1 | 1; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | __END__ | ||||||||||||||||||||