| 1 | package Pod::WSDL::AUTOLOAD; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 16 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 16 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 16 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 16 | our $AUTOLOAD; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 16 | our $VERSION = "0.05"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 163 | ▶ | sub AUTOLOAD { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
AUTOLOAD: called CC=13 SCAR=25.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 163 | my $me = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 163 | my $param = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 163 | my $fbd = ref($me) . '::FORBIDDEN_METHODS'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 163 | my $attr = $AUTOLOAD; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 163 | $attr =~ s/.*:://; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 163 | ▶ | if (@_) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | croak ref $me . " received call to '$attr' with too many params (max 1). Call was '$attr($param, " . join (", ", @_) . ")'!"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 163 | ▶ | if ($attr eq "DESTROY"){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 43 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | } elsif (exists $me->{'_' . $attr}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 16 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 113 | ▶ | if (defined $param) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 18 | ▶ | croak ref ($me) . " does not allow setting of '$attr', died" if (caller)[0] ne ref($me) and %$fbd and $fbd->{$attr} and !$fbd->{$attr}->{set}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition77%7/9
(caller)[0] ne ref $me and %$fbd and $fbd->{$attr} and not $fbd->{$attr}{"set"}
(caller)[0] ne ref $me and %$fbd and $fbd->{$attr}
(caller)[0] ne ref $me and %$fbd
MC/DC50%2/4
(caller)[0] ne ref $me and %$fbd and $fbd->{$attr} and not $fbd->{$attr}{"set"}
(caller)[0] ne ref $me
%$fbd
$fbd->{$attr}
not $fbd->{$attr}{"set"}
Truth table60%3/5
A and B and C and not(D)
A= (caller)[0] ne ref $meB= %$fbdC= $fbd->{$attr}D= not $fbd->{$attr}{"set"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 9 | $me->{'_' . $attr} = $param; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 9 | return $me; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 95 | ▶ | croak ref ($me) . " does not allow getting of '$attr', died" if (caller)[0] ne ref($me) and %$fbd and $fbd->{$attr} and !$fbd->{$attr}->{get}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition88%8/9
(caller)[0] ne ref $me and %$fbd and $fbd->{$attr} and not $fbd->{$attr}{"get"}
(caller)[0] ne ref $me and %$fbd and $fbd->{$attr}
(caller)[0] ne ref $me and %$fbd
MC/DC75%3/4
(caller)[0] ne ref $me and %$fbd and $fbd->{$attr} and not $fbd->{$attr}{"get"}
(caller)[0] ne ref $me
%$fbd
$fbd->{$attr}
not $fbd->{$attr}{"get"}
Truth table80%4/5
A and B and C and not(D)
A= (caller)[0] ne ref $meB= %$fbdC= $fbd->{$attr}D= not $fbd->{$attr}{"get"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | #if (ref $me->{'_' . $attr} eq 'ARRAY') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | # return @{$me->{'_' . $attr}}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | #} elsif (ref $me->{'_' . $attr} eq 'HASH') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | # return %{$me->{'_' . $attr}}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | #} elsif (ref $me->{'_' . $attr} eq 'SCALAR') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | # return ${$me->{'_' . $attr}}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | #} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 93 | return $me->{'_' . $attr}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | #} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 7 | croak "I have no method called '$attr()'!"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 16 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||