| 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
| |||||||||||
| 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__ | ||||||||||