blib/lib/Moo/sification.pm

filter: Statementstmt 100% 28 / 28 Branchbran 100% 8 / 8 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 96.0% 48 / 50 CC 6 SCAR 6.6
CC
6
Cov
97%
DESTROY
3.0
import
3.0
unimport
2.0
CRAP 1.9
« blib/lib/Moo/HandleMoose/FakeMetaClass.pm ↑ Summary xt/lib/FatalWarnings.pm »
1 package Moo::sification;
2 108 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 108 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 108 ▶no warnings 'once';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 108 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 108 ▶BEGIN { our @CARP_NOT = qw(Moo::HandleMoose) }
Subroutine BEGIN: called CC=1 SCAR=0.0
8 108 ▶use Moo::_Utils qw(_in_global_destruction);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 5 ▶sub unimport {
Subroutine unimport: called CC=2 SCAR=6.9
11 5 ▶ croak "Can't disable Moo::sification after inflation has been done"
Branch: 1 branch
BranchTrueFalseTotal
if $Moo::HandleMoose::SETUP_DONE 2 3 5
12 if $Moo::HandleMoose::SETUP_DONE;
13 3 our $disabled = 1;
14 }
15  
16 27 ▶sub Moo::HandleMoose::AuthorityHack::DESTROY {
Subroutine DESTROY: called CC=3 SCAR=11.0
17 27 ▶ unless (our $disabled or _in_global_destruction) {
Branch: 1 branch
BranchTrueFalseTotal
unless (our $disabled or &_in_global_destruction()) 26 1 27
Condition66%2/3
our $disabled or &_in_global_destruction()
l!l&&r!l&&!r
1026
MC/DC50%1/2
our $disabled or &_in_global_destruction()
our $disabled &_in_global_destruction()
Truth table66%2/3
A or B
A= our $disabledB= &_in_global_destruction()
ABresult
1X1
011
000
18 26 require Moo::HandleMoose;
19 26 Moo::HandleMoose->import;
20 }
21 }
22  
23 171 ▶sub import {
Subroutine import: called CC=3 SCAR=11.0
24 return
25 171 ▶ if our $setup_done;
Branch: 1 branch
BranchTrueFalseTotal
if our $setup_done 63 108 171
26 108 ▶ if ($INC{"Moose.pm"}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($INC{'Moose.pm'}) { } 12 96 108
27 12 require Moo::HandleMoose;
28 12 Moo::HandleMoose->import;
29 } else {
30 96 $Moose::AUTHORITY = bless({}, 'Moo::HandleMoose::AuthorityHack');
31 }
32 108 $setup_done = 1;
33 }
34  
35 108 1;
« blib/lib/Moo/HandleMoose/FakeMetaClass.pm ↑ Summary xt/lib/FatalWarnings.pm »