WSDL/Fault.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond 100% 4 / 4 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 35 / 35 CC 4 SCAR 10.0
CC
4
Cov
100%
new
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« WSDL/Doc.pm ↑ Summary
1 package Pod::WSDL::Fault;
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  
5 8 ▶use Pod::WSDL::AUTOLOAD;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 8 our $VERSION = "0.05";
8 8 our @ISA = qw/Pod::WSDL::AUTOLOAD/;
9  
10 8 our %FORBIDDEN_METHODS = (
11 type => {get => 1, set => 0},
12 descr => {get => 1, set => 0},
13 wsdlName => {get => 1, set => 0},
14 );
15  
16 8 ▶sub new {
Subroutine new: called CC=4 SCAR=13.9
Pod documented
17 8 my ($pkg, $str) = @_;
18  
19 8 ▶ $str ||= '' ; # avoid warnings here, will die soon
Condition100%2/2
$str ||= ""
l!l
71
MC/DC100%1/1
$str ||= ""
$str
Truth table100%2/2
A
A= $str
Aresult
11
00
20 8 ▶ $str =~ s/^\s*_FAULT\s*//i or die "_FAULT statements must have structure '_FAULT <type> <text>', like '_FAULT My::Fault This is my documentation'";
Branch: 1 branch
BranchTrueFalseTotal
$str =~ s/^\s*_FAULT\s*//i or die "_FAULT statements must have structure '_FAULT <type> <text>', like '_FAULT My::Fault This is my documentation'" 6 2 8
21 6 my ($type, $descr) = split /\s+/, $str, 2;
22  
23 6 my $wsdlName = $type;
24 6 $wsdlName =~ s/::(.)/uc $1/eg;
25  
26 6 ▶ $descr ||= '';
Condition100%2/2
$descr ||= ""
l!l
51
MC/DC100%1/1
$descr ||= ""
$descr
Truth table100%2/2
A
A= $descr
Aresult
11
00
27
28 6 bless {
29 _type => $type,
30 _descr => $descr,
31 _wsdlName => ucfirst $wsdlName,
32 }, $pkg;
33 }
34  
35 8 1;
36 __END__
« WSDL/Doc.pm ↑ Summary