lib/SOAP/Lite/Utils.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 33 / 33 CC 4 SCAR 6.4
CC
4
Cov
100%
__ANON__
3.0
__mk_accessors
2.0
BEGIN
1.0
CRAP 1.9
« script/stubmaker.pl ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm »
1 package SOAP::Lite::Utils;
2 43 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 sub import {
5 215 ▶ my $caller = caller();
Subroutine import: called CC=1 SCAR=0.0
6 43 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 215 *{ "$caller\::__mk_accessors" } = \&__mk_accessors;
8 }
9  
10 sub __mk_accessors {
11 215 ▶ my ($class, @method_from) = @_;
Subroutine __mk_accessors: called CC=2 SCAR=6.9
12 43 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 215 for my $method ( @method_from ) {
14 1505 my $field = '_' . $method;
15 1505 *{ "$class\::$method" } = sub {
16 3247 ▶ my $self = ref $_[0] ? shift : shift->new();
Subroutine __ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 3240 7 3247
17 3247 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 659 2588 3247
18 659 $self->{$field} = shift;
19 659 return $self
20 }
21 2588 return $self->{$field};
22 }
23 1505 }
24 }
25  
26  
27 43 1;
28  
29 __END__
« script/stubmaker.pl ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm »