line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
896
|
use 5.006; # pragmas |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
136
|
|
2
|
4
|
|
|
4
|
|
15
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
106
|
|
3
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
584
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::File::ShareDir::Object::Module; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.001001'; |
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
|
|
|
|
|
1059
|
require Test::File::ShareDir::Object::Inc; |
28
|
3
|
|
|
|
|
33
|
return Test::File::ShareDir::Object::Inc->new(); |
29
|
|
|
|
|
|
|
}, |
30
|
|
|
|
|
|
|
modules => sub { |
31
|
0
|
|
|
|
|
0
|
return {}; |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
root => sub { |
34
|
2
|
|
|
|
|
127
|
require Path::Tiny; |
35
|
2
|
|
|
|
|
6
|
return Path::Tiny::path(q[./])->absolute; |
36
|
|
|
|
|
|
|
}, |
37
|
4
|
|
|
4
|
|
1813
|
}; |
|
4
|
|
|
|
|
9031
|
|
|
4
|
|
|
|
|
43
|
|
38
|
|
|
|
|
|
|
|
39
|
4
|
|
|
4
|
|
1726
|
use Carp qw( carp ); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
1543
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
3
|
|
|
3
|
|
1627
|
sub __rcopy { require File::Copy::Recursive; goto \&File::Copy::Recursive::rcopy; } |
|
3
|
|
|
|
|
14681
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub module_names { |
70
|
3
|
|
|
3
|
1
|
4
|
my ( $self, ) = @_; |
71
|
3
|
|
|
|
|
3
|
return keys %{ $self->modules }; |
|
3
|
|
|
|
|
82
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub module_share_target_dir { |
83
|
3
|
|
|
3
|
1
|
6
|
my ( $self, $module ) = @_; |
84
|
|
|
|
|
|
|
|
85
|
3
|
|
|
|
|
7
|
$module =~ s/::/-/msxg; |
86
|
|
|
|
|
|
|
|
87
|
3
|
|
|
|
|
58
|
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
|
|
|
|
|
2052
|
require Path::Tiny; |
101
|
3
|
|
|
|
|
33998
|
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
|
7
|
my ( $self, $module ) = @_; |
114
|
3
|
|
|
|
|
7
|
my $source = $self->module_share_source_dir($module); |
115
|
3
|
|
|
|
|
489
|
my $target = $self->module_share_target_dir($module); |
116
|
3
|
|
|
|
|
221
|
return __rcopy( $source, $target ); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub install_all_modules { |
128
|
3
|
|
|
3
|
1
|
5
|
my ($self) = @_; |
129
|
3
|
|
|
|
|
8
|
for my $module ( $self->module_names ) { |
130
|
3
|
|
|
|
|
48
|
$self->install_module($module); |
131
|
|
|
|
|
|
|
} |
132
|
3
|
|
|
|
|
3281
|
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
|
|
|
|
|
86
|
$self->inc->register; |
160
|
3
|
|
|
|
|
7
|
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
|
|
|
|
|
27
|
$self->inc->clear; |
176
|
1
|
|
|
|
|
13
|
return; |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
1; |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
__END__ |