lib/SOAP/Lite/Utils.pm

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