| 1 | package WebService::CIA::Source; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 4 | require 5.005_62; | |||||||||||||||||||||||||||
| 4 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 4 | our $VERSION = '1.4'; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | # Preloaded methods go here. | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 2 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 2 | my $proto = shift; | |||||||||||||||||||||||||||
| 15 | 2 | my $source = shift; | |||||||||||||||||||||||||||
| 16 | 2 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||||||||||
| 17 | 2 | my $self = {}; | |||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 2 | bless ($self, $class); | |||||||||||||||||||||||||||
| 20 | 2 | return $self; | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 8 | ▶ | sub value { | ||||||||||||||||||||||||||
|
Subroutine
value: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 8 | my $self = shift; | |||||||||||||||||||||||||||
| 27 | 8 | my ($cc, $f) = @_; | |||||||||||||||||||||||||||
| 28 | 8 | ▶ | if ($cc eq 'testcountry' and $f eq 'Test') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$cc eq "testcountry" and $f eq "Test"
MC/DC100%2/2
$cc eq "testcountry" and $f eq "Test"
$cc eq "testcountry"
$f eq "Test"
Truth table100%3/3
A and B
A= $cc eq "testcountry"B= $f eq "Test"
| |||||||||||||||||||||||||||||
| 29 | 4 | return 'Wombat'; | |||||||||||||||||||||||||||
| 30 | } else { | ||||||||||||||||||||||||||||
| 31 | 4 | return; | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 7 | ▶ | sub all { | ||||||||||||||||||||||||||
|
Subroutine
all: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 7 | my $self = shift; | |||||||||||||||||||||||||||
| 39 | 7 | my $cc = shift; | |||||||||||||||||||||||||||
| 40 | 7 | ▶ | if ($cc eq 'testcountry') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 41 | 5 | return {'Test' => 'Wombat'}; | |||||||||||||||||||||||||||
| 42 | } else { | ||||||||||||||||||||||||||||
| 43 | 2 | return {}; | |||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 4 | 1; | |||||||||||||||||||||||||||
| 50 | __END__ | ||||||||||||||||||||||||||||