WSDL/Return.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 6 / 6 Conditioncond 85.7% 6 / 7 MC/DCmcdc 75.0% 3 / 4 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 95.3% 41 / 43 CC 7 SCAR 16.5
CC
7
Cov
97%
new
7.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.2
« WSDL/Attr.pm ↑ Summary WSDL/Utils.pm »
1 package Pod::WSDL::Return;
2 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use Pod::WSDL::AUTOLOAD;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 our $VERSION = "0.05";
7 8 our @ISA = qw/Pod::WSDL::AUTOLOAD/;
8  
9 8 our %FORBIDDEN_METHODS = (
10 type => {get => 1, set => 0},
11 array => {get => 1, set => 0},
12 descr => {get => 1, set => 0},
13 );
14  
15 9 ▶sub new {
Subroutine new: called CC=7 SCAR=19.5
Pod documented
16 9 my ($pkg, $str) = @_;
17  
18 9 ▶ defined $str or $str = ''; # avoids warnings, dies soon
Branch: 1 branch
BranchTrueFalseTotal
defined $str or $str = "" 8 1 9
19 9 $str =~ s/\s*_RETURN\s*//i;
20 9 my ($type, $descr) = split /\s+/, $str, 2;
21  
22 9 ▶ $type ||= ''; # avoids warnings, dies soon
Condition100%2/2
$type ||= ""
l!l
81
MC/DC100%1/1
$type ||= ""
$type
Truth table100%2/2
A
A= $type
Aresult
11
00
23  
24 9 $type =~ /([\$\@])(.+)/;
25 9 ▶ die "Type '$type' must have structure (\$|\@)<typename>, e.g. '\$boolean' or '\@string', died" unless $1 and $2;
Branch: 1 branch
BranchTrueFalseTotal
unless $1 and $2 2 7 9
Condition66%2/3
$1 and $2
!ll&&!rl&&r
207
MC/DC50%1/2
$1 and $2
$1 $2
Truth table66%2/3
A and B
A= $1B= $2
ABresult
0X0
100
111
26
27 7 ▶ bless {
Branch: 1 branch
BranchTrueFalseTotal
$1 eq '@' ? : 2 5 7
Condition100%2/2
$descr || ''
l!l
61
MC/DC100%1/1
$descr || ''
$descr
Truth table100%2/2
A
A= $descr
Aresult
11
00
28 _type => $2,
29 _descr => $descr || '',
30 _array => $1 eq '@' ? 1 : 0,
31 }, $pkg;
32 }
33  
34 8 1;
35 __END__
« WSDL/Attr.pm ↑ Summary WSDL/Utils.pm »