blib/lib/Sub/Alias.pm

filter: Statementstmt 61.8% 138 / 223 Branchbran 42.8% 6 / 14 Conditioncond 42.8% 6 / 14 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 72.0% 18 / 25 Podpod n/a totaltotal 59.3% 168 / 283 CC 15 SCAR 22.7
CC
15
Cov
60%
import
25.9
unimport
5.2
BEGIN
1.4
CRAP 9.7
↑ Summary
1 package Sub::Alias;
2 6 ▶use 5.012;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 our $VERSION = '1.0.0';
7  
8 6 ▶use Keyword::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 7 ▶sub import {
Subroutine import: called CC=13 SCAR=32.5
11 0 ▶ keyword alias (Ident $new_ident, Comma, Str $old_name) {
Subroutine __ANON__: called CC=1 SCAR=0.9
Subroutine __ANON__: not called CC=1 SCAR=0.9
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 7 0 7
Condition50%1/2
(caller 0)[3] // ""
l!l
70
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
12 0 my $old_ident = substr($old_name, 1, -1);
13 0 return qq! {; no strict "refs"; *{"${new_ident}"} = *{"${old_ident}"}; }; !;
14 };
15 0  
16 0 ▶ keyword alias (Str $new_name, Comma, Str $old_name) {
Subroutine __ANON__: called CC=1 SCAR=0.8
Subroutine __ANON__: not called CC=1 SCAR=0.8
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 7 0 7
Condition50%1/2
(caller 0)[3] // ""
l!l
70
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
17 0 my $new_ident = substr($new_name, 1, -1);
18 0 my $old_ident = substr($old_name, 1, -1);
19 0 return qq! {; no strict "refs"; *{"${new_ident}"} = *{"${old_ident}"}; }; !;
20 0 };
21 0  
22 0 ▶ keyword alias (Ident $new_ident, Comma, /\\&(?&PerlIdentifier)/ $sub_ref) {
Subroutine __ANON__: called CC=1 SCAR=0.7
Subroutine __ANON__: not called CC=1 SCAR=0.7
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 7 0 7
Condition50%1/2
(caller 0)[3] // ""
l!l
70
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
23 0 ▶ my $old_ident = substr($sub_ref, 2);
Subroutine BEGIN: called CC=1 SCAR=0.4
24 0 return qq! {; no strict "refs"; *{"${new_ident}"} = *{"${old_ident}"}; }; !;
25 0 };
26 0  
27 0 ▶ keyword alias (Str $new_name, Comma, /\\&(?&PerlIdentifier)/ $sub_ref) {
Subroutine __ANON__: called CC=1 SCAR=0.7
Subroutine __ANON__: not called CC=1 SCAR=0.7
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 7 0 7
Condition50%1/2
(caller 0)[3] // ""
l!l
70
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
28 0 my $new_ident = substr($new_name, 1, -1);
29 0 ▶ my $old_ident = substr($sub_ref, 2);
Subroutine BEGIN: called CC=1 SCAR=0.4
30 0 my $caller = caller(2);
31 0 return qq! {; no strict "refs"; *{"${new_ident}"} = *{"${old_ident}"}; }; !;
32 0 };
33 0  
34 0 ▶ keyword alias (VariableScalar $new_name, Comma, Str $old_name) {
Subroutine BEGIN: called CC=1 SCAR=0.6
Subroutine __ANON__: called CC=1 SCAR=0.7
Subroutine __ANON__: not called CC=1 SCAR=0.7
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 7 0 7
Condition50%1/2
(caller 0)[3] // ""
l!l
70
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
35 0 my $old_ident = substr($old_name, 1, -1);
36 0 return qq! {; no strict "refs"; *{"${new_name}"} = *{"${old_ident}"}; }; !;
37 0 };
38 0  
39 0 ▶ keyword alias (VariableScalar $new_name, Comma, /\\&(?&PerlIdentifier)/ $sub_ref) {
Subroutine __ANON__: called CC=1 SCAR=0.9
Subroutine __ANON__: not called CC=1 SCAR=0.9
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 7 0 7
Condition50%1/2
(caller 0)[3] // ""
l!l
70
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
Aresult
11
00
40 0 my $old_ident = substr($sub_ref, 2);
41 0 ▶ return qq! {; no strict "refs"; *{"${new_name}"} = *{"${old_ident}"}; }; !;
Subroutine BEGIN: called CC=1 SCAR=0.4
42 0 };
43 0 }
44 0  
45 0 ▶sub unimport {
Subroutine unimport: not called CC=3 SCAR=16.5
46 0 ▶ unkeyword alias;
Subroutine BEGIN: called CC=1 SCAR=3.3
Branch: 1 branch
BranchTrueFalseTotal
if (((caller 0)[3] // "") =~ /\b(?:un)?import\Z/u) 0 0 0
Condition0%0/2
(caller 0)[3] // ""
l!l
00
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table0%0/2
A
A= (caller 0)[3]
Aresult
11
00
47 0 }
48 0 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.2
49 0 1;
50 6  
51 7 ▶__END__
Subroutine BEGIN: called CC=1 SCAR=0.0
↑ Summary