| 1 | package Pod::WSDL::Param; | ||||||||||||||||||||||||||||
| 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 | name => {get => 1, set => 0}, | ||||||||||||||||||||||||||||
| 11 | type => {get => 1, set => 0}, | ||||||||||||||||||||||||||||
| 12 | paramType => {get => 1, set => 0}, | ||||||||||||||||||||||||||||
| 13 | descr => {get => 1, set => 0}, | ||||||||||||||||||||||||||||
| 14 | array => {get => 1, set => 0}, | ||||||||||||||||||||||||||||
| 15 | ); | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 11 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=8 SCAR=20.8
Pod
documented
| |||||||||||||||||||||||||||||
| 18 | 11 | my ($pkg, $str) = @_; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 11 | ▶ | defined $str or $str = ''; # avoids warnings, dies soon | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 21 | 11 | ▶ | $str =~ s/\s*_(INOUT|IN|OUT)\s*//i or die "Input string '$str' does not begin with '_IN', '_OUT' or '_INOUT'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 9 | my $paramType = $1; | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 9 | my ($name, $type, $descr) = split /\s+/, $str, 3; | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 9 | ▶ | $type ||= ''; # avoids warnings, dies soon | ||||||||||||||||||||||||||
|
Condition50%1/2
$type ||= ""
MC/DC0%0/1
$type ||= ""
$type
Truth table50%1/2
A
A= $type
| |||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 9 | $type =~ /([\$\@])(.+)/; | |||||||||||||||||||||||||||
| 30 | 9 | ▶ | die "Type '$type' must have structure (\$|@)<typename>, e.g. '\$boolean' or '\@string', not '$type' died" unless $1 and $2; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$1 and $2
MC/DC50%1/2
$1 and $2
$1
$2
Truth table66%2/3
A and B
A= $1B= $2
| |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 8 | ▶ | bless { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
$descr || ''
MC/DC100%1/1
$descr || ''
$descr
Truth table100%2/2
A
A= $descr
| |||||||||||||||||||||||||||||
| 33 | _name => $name, | ||||||||||||||||||||||||||||
| 34 | _type => $2, | ||||||||||||||||||||||||||||
| 35 | _paramType => $paramType, | ||||||||||||||||||||||||||||
| 36 | _descr => $descr || '', | ||||||||||||||||||||||||||||
| 37 | _array => $1 eq '@' ? 1 : 0, | ||||||||||||||||||||||||||||
| 38 | }, $pkg; | ||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | 8 | 1; | |||||||||||||||||||||||||||
| 42 | __END__ | ||||||||||||||||||||||||||||