blib/lib/Sub/Clean.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package Sub::Clean;
2  
3 # attribute handing requires 5.008
4 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our $VERSION = 1.00;
10  
11 # load all the magic
12 1 ▶use Sub::Identify qw(sub_name);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 require Attribute::Lexical;
14 1 ▶use B::Hooks::EndOfScope;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 1 ▶sub _cleaner {
Subroutine _cleaner: called CC=1 SCAR=0.0
18 1 my ($uboat, undef, undef, $state) = @_;
19 1 ▶ on_scope_end {
Subroutine __ANON__: called CC=1 SCAR=0.0
20 1 namespace::clean->clean_subroutines($state->[0],sub_name($uboat));
21 }
22 1 };
23  
24 1 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
25 1 Attribute::Lexical->import("CODE:Cleaned" => \&_cleaner);
26 1 return;
27 }
28  
29 1 1;
30  
31 __END__
↑ Summary