| 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
}
$args ||= {}
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
}
Truth table100%2/2
A
A= $args
| |||||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||||