line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
507
|
use 5.006; # pragmas |
|
4
|
|
|
|
|
9
|
|
2
|
4
|
|
|
4
|
|
15
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
87
|
|
3
|
4
|
|
|
4
|
|
14
|
use warnings; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
569
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Module; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001002'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Object Oriented ShareDir creation for modules |
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
|
3
|
|
|
|
|
11594
|
require Test::File::ShareDir::Object::Inc; |
28
|
3
|
|
|
|
|
22
|
return Test::File::ShareDir::Object::Inc->new(); |
29
|
|
|
|
|
|
|
}, |
30
|
|
|
|
|
|
|
modules => sub { |
31
|
0
|
|
|
|
|
0
|
return {}; |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
root => sub { |
34
|
2
|
|
|
|
|
124
|
require Path::Tiny; |
35
|
2
|
|
|
|
|
7
|
return Path::Tiny::path(q[./])->absolute; |
36
|
|
|
|
|
|
|
}, |
37
|
4
|
|
|
4
|
|
2251
|
}; |
|
4
|
|
|
|
|
10047
|
|
|
4
|
|
|
|
|
45
|
|
38
|
|
|
|
|
|
|
|
39
|
4
|
|
|
4
|
|
1660
|
use Carp qw( carp ); |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
2440
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
3
|
|
|
3
|
|
1421
|
sub __rcopy { require File::Copy::Recursive; goto \&File::Copy::Recursive::rcopy; } |
|
3
|
|
|
|
|
12815
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub module_names { |
70
|
3
|
|
|
3
|
1
|
3
|
my ( $self, ) = @_; |
71
|
3
|
|
|
|
|
4
|
return keys %{ $self->modules }; |
|
3
|
|
|
|
|
71
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub module_share_target_dir { |
83
|
3
|
|
|
3
|
1
|
8
|
my ( $self, $module ) = @_; |
84
|
|
|
|
|
|
|
|
85
|
3
|
|
|
|
|
6
|
$module =~ s/::/-/msxg; |
86
|
|
|
|
|
|
|
|
87
|
3
|
|
|
|
|
76
|
return $self->inc->module_tempdir->child($module); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub module_share_source_dir { |
99
|
3
|
|
|
3
|
1
|
4
|
my ( $self, $module ) = @_; |
100
|
3
|
|
|
|
|
2411
|
require Path::Tiny; |
101
|
3
|
|
|
|
|
29783
|
return Path::Tiny::path( $self->modules->{$module} )->absolute( $self->root ); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub install_module { |
113
|
3
|
|
|
3
|
1
|
4
|
my ( $self, $module ) = @_; |
114
|
3
|
|
|
|
|
6
|
my $source = $self->module_share_source_dir($module); |
115
|
3
|
|
|
|
|
456
|
my $target = $self->module_share_target_dir($module); |
116
|
3
|
|
|
|
|
132
|
return __rcopy( $source, $target ); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub install_all_modules { |
128
|
3
|
|
|
3
|
1
|
4
|
my ($self) = @_; |
129
|
3
|
|
|
|
|
6
|
for my $module ( $self->module_names ) { |
130
|
3
|
|
|
|
|
30
|
$self->install_module($module); |
131
|
|
|
|
|
|
|
} |
132
|
3
|
|
|
|
|
2832
|
return; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
sub add_to_inc { |
142
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
143
|
0
|
|
|
|
|
0
|
carp 'add_to_inc deprecated since 1.001000, use register'; |
144
|
0
|
|
|
|
|
0
|
return $self->register; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
sub register { |
158
|
3
|
|
|
3
|
1
|
6
|
my ($self) = @_; |
159
|
3
|
|
|
|
|
73
|
$self->inc->register; |
160
|
3
|
|
|
|
|
6
|
return; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub clear { |
174
|
1
|
|
|
1
|
1
|
2
|
my ($self) = @_; |
175
|
1
|
|
|
|
|
20
|
$self->inc->clear; |
176
|
1
|
|
|
|
|
11
|
return; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
1; |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
__END__ |