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 44 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 sub import {
5 220 ▶ my $caller = caller();
Subroutine import: called CC=1 SCAR=0.0
6 44 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 220 *{ "$caller\::__mk_accessors" } = \&__mk_accessors;
8 }
9  
10 sub __mk_accessors {
11 220 ▶ my ($class, @method_from) = @_;
Subroutine __mk_accessors: called CC=2 SCAR=6.9
12 44 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 220 for my $method ( @method_from ) {
14 1540 my $field = '_' . $method;
15 1540 *{ "$class\::$method" } = sub {
16 3259 ▶ my $self = ref $_[0] ? shift : shift->new();
Subroutine __ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 3252 7 3259
17 3259 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 663 2596 3259
18 663 $self->{$field} = shift;
19 663 return $self
20 }
21 2596 return $self->{$field};
22 }
23 1540 }
24 }
25  
26  
27 44 1;
28  
29 __END__
« script/stubmaker.pl ↑ Summary lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm »