| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
## no critic: TestingAndDebugging::RequireUseStrict |
|
2
|
|
|
|
|
|
|
package Require::HookChain::source::test::str; |
|
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, $src) = @_; |
|
16
|
0
|
|
|
|
|
|
bless { src => $src }, $class; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub Require::HookChain::source::test::str::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
|
0
|
|
|
|
|
return if defined $r->src; |
|
26
|
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$r->src($self->{src}); |
|
28
|
0
|
|
|
|
|
|
return 1; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
|
32
|
|
|
|
|
|
|
# ABSTRACT: Use a constant string as source code |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |