| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package this_mod; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
370289
|
use strict; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
99
|
|
|
4
|
2
|
|
|
2
|
|
1353
|
use App::ThisDist; |
|
|
2
|
|
|
|
|
23607
|
|
|
|
2
|
|
|
|
|
1108
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
|
7
|
|
|
|
|
|
|
our $DATE = '2024-01-06'; # DATE |
|
8
|
|
|
|
|
|
|
our $DIST = 'this_mod'; # DIST |
|
9
|
|
|
|
|
|
|
our $VERSION = '0.001'; # VERSION |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $mod; |
|
12
|
|
|
|
|
|
|
our @args; |
|
13
|
|
|
|
|
|
|
sub import { |
|
14
|
0
|
|
|
0
|
|
|
(my $class, @args) = @_; |
|
15
|
|
|
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
|
unless (defined $mod) { |
|
17
|
0
|
|
|
|
|
|
my $res = App::ThisDist::this_mod(".", 'extract_version', 'detail'); |
|
18
|
0
|
|
|
|
|
|
$mod = $res->{module}; |
|
19
|
0
|
0
|
|
|
|
|
die "Can't guess 'this module'" unless defined $mod; |
|
20
|
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
(my $mod_pm = "$mod.pm") =~ s!::!/!g; |
|
22
|
0
|
|
|
|
|
|
require $mod_pm; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
0
|
0
|
|
|
|
|
return if $mod eq __PACKAGE__; # to avoid endless recursion |
|
25
|
0
|
|
|
|
|
|
my $caller = caller(); |
|
26
|
0
|
0
|
|
|
|
|
eval "package $caller; $mod->import(\@this_mod\::args)"; die if $@; ## no critic: BuiltinFunctions::ProhibitStringyEval |
|
|
0
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub unimport { |
|
30
|
0
|
|
|
0
|
|
|
(my $class, @args) = @_; |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
unless (defined $mod) { |
|
33
|
0
|
|
|
|
|
|
my $res = App::ThisDist::this_mod(".", 'extract_version', 'detail'); |
|
34
|
0
|
|
|
|
|
|
$mod = $res->{module}; |
|
35
|
0
|
0
|
|
|
|
|
die "Can't guess 'this module'" unless defined $mod; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
(my $mod_pm = "$mod.pm") =~ s!::!/!g; |
|
38
|
0
|
|
|
|
|
|
require $mod_pm; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
0
|
0
|
|
|
|
|
return if $mod eq __PACKAGE__; # to avoid endless recursion |
|
41
|
0
|
|
|
|
|
|
my $caller = caller(); |
|
42
|
0
|
0
|
|
|
|
|
eval "package $caller; $mod->import(\@this_mod\::args)"; die if $@; ## no critic: BuiltinFunctions::ProhibitStringyEval |
|
|
0
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
|
46
|
|
|
|
|
|
|
# ABSTRACT: Load "this module" |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |