line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
697
|
use 5.006; # pragmas |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
95
|
|
2
|
3
|
|
|
3
|
|
9
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
88
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
368
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Dist; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001000'; |
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
|
|
|
|
|
896
|
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
|
|
|
|
|
76
|
require Path::Tiny; |
35
|
1
|
|
|
|
|
3
|
return Path::Tiny::path(q[./])->absolute; |
36
|
|
|
|
|
|
|
}, |
37
|
3
|
|
|
3
|
|
1689
|
}; |
|
3
|
|
|
|
|
1898005
|
|
|
3
|
|
|
|
|
36
|
|
38
|
|
|
|
|
|
|
|
39
|
3
|
|
|
3
|
|
1329
|
use Carp qw( carp ); |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
1070
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
|
972
|
sub __rcopy { require File::Copy::Recursive; goto \&File::Copy::Recursive::rcopy; } |
|
2
|
|
|
|
|
9598
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub dist_names { |
70
|
2
|
|
|
2
|
1
|
3
|
my ($self) = @_; |
71
|
2
|
|
|
|
|
2
|
return keys %{ $self->dists }; |
|
2
|
|
|
|
|
45
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub dist_share_target_dir { |
83
|
2
|
|
|
2
|
1
|
4
|
my ( $self, $distname ) = @_; |
84
|
2
|
|
|
|
|
41
|
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
|
|
|
|
|
1346
|
require Path::Tiny; |
98
|
2
|
|
|
|
|
22541
|
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
|
|
|
|
|
5
|
my $source = $self->dist_share_source_dir($distname); |
112
|
2
|
|
|
|
|
305
|
my $target = $self->dist_share_target_dir($distname); |
113
|
2
|
|
|
|
|
140
|
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
|
|
|
|
|
5
|
for my $dist ( $self->dist_names ) { |
127
|
2
|
|
|
|
|
25
|
$self->install_dist($dist); |
128
|
|
|
|
|
|
|
} |
129
|
2
|
|
|
|
|
2142
|
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
|
|
|
|
|
55
|
$self->inc->register; |
157
|
2
|
|
|
|
|
5
|
return; |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub clear { |
171
|
1
|
|
|
1
|
1
|
2
|
my ($self) = @_; |
172
|
1
|
|
|
|
|
24
|
$self->inc->clear; |
173
|
1
|
|
|
|
|
15
|
return; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
1; |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
__END__ |