blib/lib/Var/Mystic.pm

filter: Statementstmt 74.6% 53 / 71 Branchbran 50.0% 3 / 6 Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 78.5% 11 / 14 Podpod n/a totaltotal 70.0% 70 / 100 SCAR 21.0
CC
7
Cov
71%
import
10.1
__ANON__
1.1
__ANON__
1.1
CRAP 8.2
↑ Summary
1 package Var::Mystic;
2  
3 2 ▶use 5.014; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $VERSION = '0.000002';
6  
7 2 ▶use Keyword::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Data::Dx ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶sub import {
Subroutine import: called CC=7 SCAR=23.2
11 2 ▶ keyword mystic (ScalarVar $var) {{{ my <{$var}>; Var::Mystic::_setup(<{$var}>, '<{$var}>') }}}
Subroutine __ANON__: not called CC=1 SCAR=0.7
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 2 0 2
Condition50%1/2
(caller 0)[3] // ""
l!l
20
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
12 2  
13 2 ▶ keyword mystic (ArrayVar) {{{ BEGIN { die "Cannot declare an array to be mystic" } }}}
Subroutine __ANON__: not called CC=1 SCAR=1.2
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 2 0 2
Condition50%1/2
(caller 0)[3] // ""
l!l
20
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
14 2 ▶ keyword mystic (HashVar) {{{ BEGIN { die "Cannot declare a hash to be mystic" } }}}
Subroutine __ANON__: not called CC=1 SCAR=0.9
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 2 0 2
Condition50%1/2
(caller 0)[3] // ""
l!l
20
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
15 2 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.4
16 2 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶sub _setup : lvalue {
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶ my (undef, $name) = @_;
Subroutine _setup: called CC=1 SCAR=0.0
19  
20 2 ▶ use Variable::Magic qw< wizard cast >;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 4 ▶ cast $_[0], wizard set => sub { my (undef, $file, $line) = caller(1);
Subroutine __ANON__: called CC=1 SCAR=0.0
22 1 Data::Dx::_format_data($line, $file, $name, q{}, ${$_[0]}) };
23  
24 1 $_[0];
25 }
26  
27  
28  
29 2 1; # Magic true value required at end of module
30 __END__
↑ Summary