line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
6
|
|
|
6
|
|
781
|
use 5.006; # pragmas |
|
6
|
|
|
|
|
32
|
|
|
6
|
|
|
|
|
275
|
|
2
|
6
|
|
|
6
|
|
30
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
214
|
|
3
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
1236
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Inc; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001000'; |
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
|
|
|
|
|
42
|
require Path::Tiny; |
30
|
5
|
|
|
|
|
19
|
my $dir = Path::Tiny::tempdir( CLEANUP => 1 ); |
31
|
5
|
|
|
|
|
100662
|
push @cache, $dir; # explicit keepalive |
32
|
5
|
|
|
|
|
144
|
return $dir; |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
module_tempdir => sub { |
35
|
3
|
|
|
|
|
499
|
my ($self) = @_; |
36
|
3
|
|
|
|
|
66
|
my $dir = $self->tempdir->child('auto/share/module'); |
37
|
3
|
|
|
|
|
107
|
$dir->mkpath(); |
38
|
3
|
|
|
|
|
1086
|
return $dir->absolute; |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
dist_tempdir => sub { |
41
|
2
|
|
|
|
|
253
|
my ($self) = @_; |
42
|
2
|
|
|
|
|
31
|
my $dir = $self->tempdir->child('auto/share/dist'); |
43
|
2
|
|
|
|
|
80
|
$dir->mkpath(); |
44
|
2
|
|
|
|
|
665
|
return $dir->absolute; |
45
|
|
|
|
|
|
|
}, |
46
|
6
|
|
|
6
|
|
455
|
}; |
|
6
|
|
|
|
|
2366
|
|
|
6
|
|
|
|
|
91
|
|
47
|
6
|
|
|
6
|
|
3101
|
use Carp qw( carp ); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1207
|
|
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
|
60
|
my ($self) = @_; |
87
|
5
|
|
|
|
|
106
|
unshift @INC, $self->tempdir->stringify; |
88
|
5
|
|
|
|
|
75
|
return; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub clear { |
104
|
2
|
|
|
2
|
1
|
24
|
my ($self) = @_; |
105
|
|
|
|
|
|
|
## no critic (Variables::RequireLocalizedPunctuationVars) |
106
|
2
|
50
|
|
|
|
5
|
@INC = grep { ref or $_ ne $self->tempdir->stringify } @INC; |
|
22
|
|
|
|
|
634
|
|
107
|
2
|
|
|
|
|
33
|
return; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
1; |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
__END__ |