| 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
Condition50%1/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
Condition50%1/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
Condition50%1/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
Condition50%1/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
Condition50%1/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
Condition50%1/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table50%1/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
Condition0%0/2
(caller 0)[3] // ""
MC/DC0%0/1
(caller 0)[3] // ""
(caller 0)[3]
Truth table0%0/2
A
A= (caller 0)[3]
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||