line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
865
|
use 5.006; # pragmas |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
118
|
|
2
|
3
|
|
|
3
|
|
13
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
108
|
|
3
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
494
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Dist; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001001'; |
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
|
|
|
|
|
826
|
require Test::File::ShareDir::Object::Inc; |
28
|
2
|
|
|
|
|
21
|
return Test::File::ShareDir::Object::Inc->new(); |
29
|
|
|
|
|
|
|
}, |
30
|
|
|
|
|
|
|
dists => sub { |
31
|
0
|
|
|
|
|
0
|
return {}; |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
root => sub { |
34
|
1
|
|
|
|
|
59
|
require Path::Tiny; |
35
|
1
|
|
|
|
|
3
|
return Path::Tiny::path(q[./])->absolute; |
36
|
|
|
|
|
|
|
}, |
37
|
3
|
|
|
3
|
|
1492
|
}; |
|
3
|
|
|
|
|
7958
|
|
|
3
|
|
|
|
|
39
|
|
38
|
|
|
|
|
|
|
|
39
|
3
|
|
|
3
|
|
1446
|
use Carp qw( carp ); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
1227
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
|
995
|
sub __rcopy { require File::Copy::Recursive; goto \&File::Copy::Recursive::rcopy; } |
|
2
|
|
|
|
|
9720
|
|
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
|
|
|
|
|
56
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub dist_share_target_dir { |
83
|
2
|
|
|
2
|
1
|
5
|
my ( $self, $distname ) = @_; |
84
|
2
|
|
|
|
|
37
|
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
|
|
|
|
|
1448
|
require Path::Tiny; |
98
|
2
|
|
|
|
|
23564
|
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
|
5
|
my ( $self, $distname ) = @_; |
111
|
2
|
|
|
|
|
5
|
my $source = $self->dist_share_source_dir($distname); |
112
|
2
|
|
|
|
|
299
|
my $target = $self->dist_share_target_dir($distname); |
113
|
2
|
|
|
|
|
136
|
return __rcopy( $source, $target ); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub install_all_dists { |
125
|
2
|
|
|
2
|
1
|
5
|
my ($self) = @_; |
126
|
2
|
|
|
|
|
5
|
for my $dist ( $self->dist_names ) { |
127
|
2
|
|
|
|
|
29
|
$self->install_dist($dist); |
128
|
|
|
|
|
|
|
} |
129
|
2
|
|
|
|
|
2087
|
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
|
3
|
my ($self) = @_; |
156
|
2
|
|
|
|
|
53
|
$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
|
1
|
my ($self) = @_; |
172
|
1
|
|
|
|
|
23
|
$self->inc->clear; |
173
|
1
|
|
|
|
|
13
|
return; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
1; |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
__END__ |