blib/lib/namespace/allclean.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 28 / 28 CC 2 SCAR 2.5
CC
2
Cov
100%
import
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary Build »
1 package namespace::allclean;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 our $VERSION = "0.03";
6  
7 3 ▶use B::Hooks::EndOfScope;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 sub import {
11 3 ▶ my ($class, %args) = @_;
Subroutine import: called CC=2 SCAR=6.9
12 3 ▶ my $cleanee = exists $args{-cleanee} ? $args{-cleanee} : scalar caller;
Branch: 1 branch
BranchTrueFalseTotal
exists $args{'-cleanee'} ? : 1 2 3
13  
14 on_scope_end {
15 3 ▶ my $subs = namespace::clean->get_functions($cleanee);
Subroutine __ANON__: called CC=1 SCAR=0.0
16
17 3 my @clean = keys %$subs;
18
19 3 namespace::clean->clean_subroutines($cleanee, @clean);
20 3 };
21 }
22  
23 3 1;
24 __END__
↑ Summary Build »