| 1 | package Acme::Innuendo; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 2 | ▶ | use 5.006001; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 2 | require Exporter::Lite; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 2 | our @ISA = qw(Exporter::Lite); | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | our @EXPORT_OK = ( ); | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 2 | our @EXPORT = qw( | |||||||||||||||||||
| 14 | special_place nudge_nudge wink_wink walk_the_dog | ||||||||||||||||||||
| 15 | ); | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 2 | our $VERSION = '0.03'; | |||||||||||||||||||
| 18 | 2 | $VERSION = eval $VERSION; # see L<perlmodstyle> | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 4 | ▶ | sub special_place { | ||||||||||||||||||
|
Subroutine
special_place: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||
| 21 | 4 | ▶ | my $namespace = shift || 'main'; | ||||||||||||||||||
|
Condition50%1/2
shift() || 'main'
MC/DC0%0/1
shift() || 'main'
shift()
Truth table50%1/2
A
A= shift()
| |||||||||||||||||||||
| 22 | 4 | ▶ | if (defined $namespace) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 23 | 4 | $namespace .= '::'; | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | 2 | ▶ | no strict 'refs'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 26 | 4 | return *$namespace; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 1 | ▶ | sub nudge_nudge { | ||||||||||||||||||
|
Subroutine
nudge_nudge: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 30 | 1 | my ($root, $sym, $value) = @_; | |||||||||||||||||||
| 31 | 1 | $root->{$sym} = $value; | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 3 | ▶ | sub wink_wink { | ||||||||||||||||||
|
Subroutine
wink_wink: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 35 | 3 | my ($root, $sym) = @_; | |||||||||||||||||||
| 36 | 3 | return $root->{$sym}; | |||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 0 | ▶ | sub walk_the_dog { | ||||||||||||||||||
|
Subroutine
walk_the_dog: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||
| 41 | 0 | my $root = shift; | |||||||||||||||||||
| 42 | 0 | ▶ | my $callback = shift || sub { }; | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
shift() || sub {
}
MC/DC0%0/2
shift() || sub {
}
shift()
sub {
}
Truth table0%0/3
A || B
A= shift()B= sub {
}
| |||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 0 | ▶ | return unless ($root); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 0 | foreach my $sym (keys %$root) { | |||||||||||||||||||
| 47 | 0 | my $ref = $root->{$sym}; | |||||||||||||||||||
| 48 | 0 | ▶ | if ($sym =~ m/::$/) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 49 | 0 | ▶ | walk_the_dog($ref, $callback), if ($sym ne 'main::'); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | else { | ||||||||||||||||||||
| 52 | 0 | &$callback($root,$sym,$ref); | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | 2 | 1; | |||||||||||||||||||
| 59 | __END__ | ||||||||||||||||||||