| 1 | package Apache::SiteConfig::Statement; | ||||||||||||||||||||||||||||
| 2 | 2 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 2 | has parent => ( is => 'rw' ); | |||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 6 | ▶ | sub get_level { | ||||||||||||||||||||||||||
|
Subroutine
get_level: called CC=4 SCAR=14.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 7 | 6 | my ($self) = @_; | |||||||||||||||||||||||||||
| 8 | 6 | my $cnt = 0; | |||||||||||||||||||||||||||
| 9 | 6 | my $p = $self->parent; | |||||||||||||||||||||||||||
| 10 | 6 | ▶ | $cnt++ if $p; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 11 | 6 | ▶ | while( $p && $p->parent ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$p and $p->parent
MC/DC0%0/2
$p and $p->parent
$p
$p->parent
Truth table66%2/3
A and B
A= $pB= $p->parent
| |||||||||||||||||||||||||||||
| 12 | 0 | $p = $p->parent; | |||||||||||||||||||||||||||
| 13 | 0 | $cnt++; | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 6 | return $cnt; | |||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 2 | 1; | |||||||||||||||||||||||||||