blib/lib/lexicals.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.5% 28 / 29 CC 2 SCAR 2.9
CC
2
Cov
100%
lexicals
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary
1 3 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package lexicals;
3 3 our $VERSION = '0.35';
4  
5 3 ▶use PadWalker;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 our @EXPORT = qw(lexicals);
9  
10 4 ▶sub lexicals {
Subroutine lexicals: called CC=2 SCAR=6.9
Pod undocumented
11 4 my $hash = PadWalker::peek_my(1);
12 return +{
13 map {
14 4 my $v = $hash->{$_};
15 24 ▶ $v = $$v if ref($v) =~ m'^(SCALAR|REF)$';
Branch: 1 branch
BranchTrueFalseTotal
if ref($v) =~ /^(SCALAR|REF)$/ 18 6 24
16 24 s/^[\$\@\%\*]//;
17 24 ($_, $v);
18 } reverse sort keys %$hash
19 };
20 }
21  
22 3 1;
↑ Summary