| 1 | package TPath::Test::Or; | ||||||||||
| 2 | $TPath::Test::Or::VERSION = '1.007'; | ||||||||||
| 3 | # ABSTRACT: implements logical disjunction of tests | ||||||||||
| 4 | |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | |||||||||||
| 9 | with 'TPath::Test::Compound'; | ||||||||||
| 10 | |||||||||||
| 11 | # required by TPath::Test | ||||||||||
| 12 | 0 | ▶ | sub test { | ||||||||
|
Subroutine
test: not called CC=3 SCAR=24.8
| |||||||||||
| 13 | 0 | my ( $self, $ctx ) = @_; | |||||||||
| 14 | 0 | for my $t ( @{ $self->tests } ) { | |||||||||
| 15 | 0 | ▶ | return 1 if $t->test($ctx); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | } | ||||||||||
| 17 | 0 | return 0; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub to_string { | ||||||||
|
Subroutine
to_string: not called CC=1 SCAR=6.9
| |||||||||||
| 21 | 0 | my $self = shift; | |||||||||
| 22 | 0 | return $self->_compound_to_string('||'); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | __PACKAGE__->meta->make_immutable; | ||||||||||
| 26 | |||||||||||
| 27 | 1; | ||||||||||
| 28 | |||||||||||
| 29 | __END__ | ||||||||||