Zoom/SubObject.pm

filter: Statementstmt 78.9% 15 / 19 Branchbran n/a Conditioncond 80.0% 4 / 5 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 2 totaltotal 70.5% 24 / 34 CC 3 SCAR 6.9
CC
3
Cov
79%
new
3.0
with_zconfig
2.0
BEGIN
1.0
CRAP 2.0
« Zoom/MaybeDebug.pm ↑ Summary Zoom/Transform.pm »
1 package HTML::Zoom::SubObject;
2  
3 15 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 573 ▶sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod undocumented
7 573 my ($class, $args) = @_;
8 573 ▶ ($args||={})->{zconfig} ||= do {
Condition80%4/5
+($args ||= {})->{"zconfig"} ||= do { require HTML::Zoom::ZConfig; "HTML::Zoom::ZConfig"->new }
l!l&&r!l&&!r
3841890
$args ||= {}
l!l
51459
MC/DC0%0/2
+($args ||= {})->{"zconfig"} ||= do { require HTML::Zoom::ZConfig; "HTML::Zoom::ZConfig"->new }
+($args ||= {})->{"zconfig"} do { require HTML::Zoom::ZConfig; "HTML::Zoom::ZConfig"->new }
MC/DC100%1/1
$args ||= {}
$args
Truth table66%2/3
A ||= B
A= +($args ||= {})->{"zconfig"}B= do { require HTML::Zoom::ZConfig; "HTML::Zoom::ZConfig"->new }
ABresult
1X1
011
000
Truth table100%2/2
A
A= $args
Aresult
11
00
9 189 require HTML::Zoom::ZConfig;
10 189 HTML::Zoom::ZConfig->new
11 };
12 573 my $new = { _zconfig => $args->{zconfig} };
13 573 Scalar::Util::weaken($new->{_zconfig});
14 573 bless($new, $class)
15 }
16  
17 1687 ▶sub _zconfig { shift->{_zconfig} }
Subroutine _zconfig: called CC=1 SCAR=0.0
18  
19 0 ▶sub with_zconfig {
Subroutine with_zconfig: not called CC=1 SCAR=6.9
Pod undocumented
20 0 my ($self, $zconfig) = @_;
21 0 my $new = bless({ %$self, _zconfig => $zconfig }, ref($self));
22 0 Scalar::Util::weaken($new->{_zconfig});
23 0 $new
24 }
25  
26 15 1;
« Zoom/MaybeDebug.pm ↑ Summary Zoom/Transform.pm »