line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
550
|
use 5.006; # pragmas |
|
3
|
|
|
|
|
6
|
|
2
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
62
|
|
3
|
3
|
|
|
3
|
|
10
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
439
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Dist; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001002'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Object Oriented ShareDir creation for distributions |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
use Class::Tiny { |
26
|
|
|
|
|
|
|
inc => sub { |
27
|
2
|
|
|
|
|
1377
|
require Test::File::ShareDir::Object::Inc; |
28
|
2
|
|
|
|
|
18
|
return Test::File::ShareDir::Object::Inc->new(); |
29
|
|
|
|
|
|
|
}, |
30
|
|
|
|
|
|
|
dists => sub { |
31
|
0
|
|
|
|
|
0
|
return {}; |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
root => sub { |
34
|
1
|
|
|
|
|
63
|
require Path::Tiny; |
35
|
1
|
|
|
|
|
3
|
return Path::Tiny::path(q[./])->absolute; |
36
|
|
|
|
|
|
|
}, |
37
|
3
|
|
|
3
|
|
1547
|
}; |
|
3
|
|
|
|
|
8417
|
|
|
3
|
|
|
|
|
41
|
|
38
|
|
|
|
|
|
|
|
39
|
3
|
|
|
3
|
|
1325
|
use Carp qw( carp ); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
1169
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
|
1416
|
sub __rcopy { require File::Copy::Recursive; goto \&File::Copy::Recursive::rcopy; } |
|
2
|
|
|
|
|
12729
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub dist_names { |
70
|
2
|
|
|
2
|
1
|
3
|
my ($self) = @_; |
71
|
2
|
|
|
|
|
3
|
return keys %{ $self->dists }; |
|
2
|
|
|
|
|
54
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub dist_share_target_dir { |
83
|
2
|
|
|
2
|
1
|
6
|
my ( $self, $distname ) = @_; |
84
|
2
|
|
|
|
|
52
|
return $self->inc->dist_tempdir->child($distname); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub dist_share_source_dir { |
96
|
2
|
|
|
2
|
1
|
3
|
my ( $self, $distname ) = @_; |
97
|
2
|
|
|
|
|
1765
|
require Path::Tiny; |
98
|
2
|
|
|
|
|
24021
|
return Path::Tiny::path( $self->dists->{$distname} )->absolute( $self->root ); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub install_dist { |
110
|
2
|
|
|
2
|
1
|
3
|
my ( $self, $distname ) = @_; |
111
|
2
|
|
|
|
|
4
|
my $source = $self->dist_share_source_dir($distname); |
112
|
2
|
|
|
|
|
431
|
my $target = $self->dist_share_target_dir($distname); |
113
|
2
|
|
|
|
|
138
|
return __rcopy( $source, $target ); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub install_all_dists { |
125
|
2
|
|
|
2
|
1
|
4
|
my ($self) = @_; |
126
|
2
|
|
|
|
|
4
|
for my $dist ( $self->dist_names ) { |
127
|
2
|
|
|
|
|
23
|
$self->install_dist($dist); |
128
|
|
|
|
|
|
|
} |
129
|
2
|
|
|
|
|
2976
|
return; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub add_to_inc { |
139
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
140
|
0
|
|
|
|
|
0
|
carp 'add_to_inc deprecated since 1.001000, use register'; |
141
|
0
|
|
|
|
|
0
|
return $self->register; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
sub register { |
155
|
2
|
|
|
2
|
1
|
4
|
my ($self) = @_; |
156
|
2
|
|
|
|
|
79
|
$self->inc->register; |
157
|
2
|
|
|
|
|
6
|
return; |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub clear { |
171
|
1
|
|
|
1
|
1
|
3
|
my ($self) = @_; |
172
|
1
|
|
|
|
|
27
|
$self->inc->clear; |
173
|
1
|
|
|
|
|
16
|
return; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
1; |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
__END__ |