| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
## no critic: TestingAndDebugging::RequireUseStrict |
|
2
|
|
|
|
|
|
|
package Require::HookChain::log::stderr; |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# IFUNBUILT |
|
5
|
|
|
|
|
|
|
# use strict; |
|
6
|
|
|
|
|
|
|
# use warnings; |
|
7
|
|
|
|
|
|
|
# END IFUNBUILT |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
|
10
|
|
|
|
|
|
|
our $DATE = '2023-12-05'; # DATE |
|
11
|
|
|
|
|
|
|
our $DIST = 'Require-HookChain'; # DIST |
|
12
|
|
|
|
|
|
|
our $VERSION = '0.016'; # VERSION |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
|
15
|
0
|
|
|
0
|
0
|
|
my ($class) = @_; |
|
16
|
0
|
|
|
|
|
|
bless {}, $class; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub Require::HookChain::log::stderr::INC { |
|
20
|
0
|
|
|
0
|
0
|
|
my ($self, $r) = @_; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# safety, in case we are not called by Require::HookChain |
|
23
|
0
|
0
|
|
|
|
|
return () unless ref $r; |
|
24
|
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my @caller = caller(1); |
|
26
|
0
|
|
|
|
|
|
my $elapsed = time() - $^T; |
|
27
|
0
|
|
|
|
|
|
warn "[time +${elapsed}s] Require::HookChain::log::stderr: Require-ing ".$r->filename." (called from package $caller[0] file $caller[1]:$caller[2]) ...\n"; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
|
31
|
|
|
|
|
|
|
# ABSTRACT: Log a message to STDERR |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |