| 1 | package Tree::Simple::Visitor::PreOrderTraversal; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | our $VERSION = '0.16'; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 2 | ▶ | use base qw(Tree::Simple::Visitor); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | # make sure we use the "new" interface | ||||||||||||||||||||
| 11 | # so we enforce it here | ||||||||||||||||||||
| 12 | 13 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
Pod
documented
| |||||||||||||||||||||
| 13 | 13 | my ($_class) = @_; | |||||||||||||||||||
| 14 | 13 | ▶ | my $class = ref($_class) || $_class; | ||||||||||||||||||
|
Condition33%1/3
ref $_class || $_class
MC/DC0%0/2
ref $_class || $_class
ref $_class
$_class
Truth table33%1/3
A || B
A= ref $_classB= $_class
| |||||||||||||||||||||
| 15 | 13 | my $visitor = $class->SUPER::new(); | |||||||||||||||||||
| 16 | 13 | return $visitor; | |||||||||||||||||||
| 17 | } | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 2 | 1; | |||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | __END__ | ||||||||||||||||||||