line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
6
|
|
|
6
|
|
901
|
use 5.006; # pragmas |
|
6
|
|
|
|
|
31
|
|
|
6
|
|
|
|
|
235
|
|
2
|
6
|
|
|
6
|
|
25
|
use strict; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
157
|
|
3
|
6
|
|
|
6
|
|
21
|
use warnings; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
904
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Inc; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001001'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Shared tempdir object code to inject into @INC |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my @cache; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use Class::Tiny { |
28
|
|
|
|
|
|
|
tempdir => sub { |
29
|
5
|
|
|
|
|
40
|
require Path::Tiny; |
30
|
5
|
|
|
|
|
15
|
my $dir = Path::Tiny::tempdir( CLEANUP => 1 ); |
31
|
5
|
|
|
|
|
83594
|
push @cache, $dir; # explicit keepalive |
32
|
5
|
|
|
|
|
128
|
return $dir; |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
module_tempdir => sub { |
35
|
3
|
|
|
|
|
447
|
my ($self) = @_; |
36
|
3
|
|
|
|
|
62
|
my $dir = $self->tempdir->child('auto/share/module'); |
37
|
3
|
|
|
|
|
92
|
$dir->mkpath(); |
38
|
3
|
|
|
|
|
939
|
return $dir->absolute; |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
dist_tempdir => sub { |
41
|
2
|
|
|
|
|
238
|
my ($self) = @_; |
42
|
2
|
|
|
|
|
30
|
my $dir = $self->tempdir->child('auto/share/dist'); |
43
|
2
|
|
|
|
|
59
|
$dir->mkpath(); |
44
|
2
|
|
|
|
|
626
|
return $dir->absolute; |
45
|
|
|
|
|
|
|
}, |
46
|
6
|
|
|
6
|
|
457
|
}; |
|
6
|
|
|
|
|
2199
|
|
|
6
|
|
|
|
|
75
|
|
47
|
6
|
|
|
6
|
|
2651
|
use Carp qw( carp ); |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
1070
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub add_to_inc { |
68
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
69
|
0
|
|
|
|
|
0
|
carp 'add_to_inc deprecated sice 1.001000, use register instead'; |
70
|
0
|
|
|
|
|
0
|
return $self->register; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub register { |
86
|
5
|
|
|
5
|
1
|
50
|
my ($self) = @_; |
87
|
5
|
|
|
|
|
90
|
unshift @INC, $self->tempdir->stringify; |
88
|
5
|
|
|
|
|
69
|
return; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub clear { |
104
|
2
|
|
|
2
|
1
|
13
|
my ($self) = @_; |
105
|
|
|
|
|
|
|
## no critic (Variables::RequireLocalizedPunctuationVars) |
106
|
2
|
50
|
|
|
|
10
|
@INC = grep { ref or $_ ne $self->tempdir->stringify } @INC; |
|
22
|
|
|
|
|
484
|
|
107
|
2
|
|
|
|
|
24
|
return; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
1; |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
__END__ |