line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
40384
|
use 5.006; |
|
3
|
|
|
|
|
9
|
|
2
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
71
|
|
3
|
3
|
|
|
3
|
|
19
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
325
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Gentoo::Overlay::Group; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.000001'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: A collection of Gentoo::Overlay objects. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
1803
|
use Moo qw( has ); |
|
3
|
|
|
|
|
40623
|
|
|
3
|
|
|
|
|
15
|
|
14
|
3
|
|
|
3
|
|
5641
|
use MooX::HandlesVia; |
|
3
|
|
|
|
|
27027
|
|
|
3
|
|
|
|
|
17
|
|
15
|
3
|
|
|
3
|
|
1916
|
use MooseX::Has::Sugar qw( ro lazy ); |
|
3
|
|
|
|
|
1832
|
|
|
3
|
|
|
|
|
12
|
|
16
|
3
|
|
|
3
|
|
1954
|
use Types::Standard qw( HashRef Str ); |
|
3
|
|
|
|
|
191397
|
|
|
3
|
|
|
|
|
31
|
|
17
|
3
|
|
|
3
|
|
3648
|
use Types::Path::Tiny qw( Dir ); |
|
3
|
|
|
|
|
98685
|
|
|
3
|
|
|
|
|
33
|
|
18
|
3
|
|
|
3
|
|
2935
|
use namespace::clean; |
|
3
|
|
|
|
|
32034
|
|
|
3
|
|
|
|
|
22
|
|
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
3
|
|
2528
|
use Gentoo::Overlay 2.001001; |
|
3
|
|
|
|
|
309829
|
|
|
3
|
|
|
|
|
104
|
|
21
|
3
|
|
|
3
|
|
18
|
use Gentoo::Overlay::Types qw( Gentoo__Overlay_Overlay ); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
20
|
|
22
|
3
|
|
|
3
|
|
858
|
use Gentoo::Overlay::Exceptions qw( exception ); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
22
|
|
23
|
3
|
|
|
3
|
|
245
|
use Scalar::Util qw( blessed ); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
2919
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has '_overlays' => ( |
54
|
|
|
|
|
|
|
ro, lazy, |
55
|
|
|
|
|
|
|
isa => HashRef [Gentoo__Overlay_Overlay], |
56
|
|
|
|
|
|
|
default => sub { return {} }, |
57
|
|
|
|
|
|
|
handles_via => 'Hash', |
58
|
|
|
|
|
|
|
handles => { |
59
|
|
|
|
|
|
|
_has_overlay => exists =>, |
60
|
|
|
|
|
|
|
overlay_names => keys =>, |
61
|
|
|
|
|
|
|
overlays => elements =>, |
62
|
|
|
|
|
|
|
get_overlay => get =>, |
63
|
|
|
|
|
|
|
_set_overlay => set =>, |
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
my $_str = Str(); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub _type_print { |
78
|
|
|
|
|
|
|
return |
79
|
1
|
50
|
|
1
|
|
11
|
ref $_ ? ref $_ |
|
|
50
|
|
|
|
|
|
80
|
|
|
|
|
|
|
: defined $_ ? 'scalar<' . $_ . '>' |
81
|
|
|
|
|
|
|
: 'scalar=undef'; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub add_overlay { |
94
|
15
|
|
|
15
|
1
|
22002
|
my ( $self, @args ) = @_; |
95
|
15
|
100
|
66
|
|
|
112
|
if ( 1 == @args and blessed $args[0] ) { |
96
|
7
|
|
|
|
|
31
|
goto $self->can('_add_overlay_object'); |
97
|
|
|
|
|
|
|
} |
98
|
8
|
100
|
|
|
|
37
|
if ( $_str->check( $args[0] ) ) { |
99
|
7
|
|
|
|
|
153
|
goto $self->can('_add_overlay_string_path'); |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
return exception( |
102
|
|
|
|
|
|
|
ident => 'bad overlay type', |
103
|
|
|
|
|
|
|
message => <<'EOF', |
104
|
|
|
|
|
|
|
Unrecognised parameter types passed to add_overlay. |
105
|
|
|
|
|
|
|
Expected: \n%{signatures}s. |
106
|
|
|
|
|
|
|
Got: [%{type}s]}. |
107
|
|
|
|
|
|
|
EOF |
108
|
|
|
|
|
|
|
payload => { |
109
|
3
|
|
|
|
|
8
|
signatures => ( join q{}, map { qq{ \$group->add_overlay( $_ );\n} } qw( Str Path::Tiny Gentoo::Overlay ) ), |
110
|
1
|
|
|
|
|
9
|
type => ( join q{,}, map { _type_print } @args ), |
|
1
|
|
|
|
|
3
|
|
111
|
|
|
|
|
|
|
}, |
112
|
|
|
|
|
|
|
); |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub iterate { |
125
|
3
|
|
|
3
|
1
|
30
|
my ( $self, $what, $callback ) = @_; ## no critic (Variables::ProhibitUnusedVarsStricter) |
126
|
3
|
|
|
|
|
34
|
my %method_map = ( |
127
|
|
|
|
|
|
|
ebuilds => _iterate_ebuilds =>, |
128
|
|
|
|
|
|
|
categories => _iterate_categories =>, |
129
|
|
|
|
|
|
|
packages => _iterate_packages =>, |
130
|
|
|
|
|
|
|
overlays => _iterate_overlays =>, |
131
|
|
|
|
|
|
|
); |
132
|
3
|
100
|
|
|
|
13
|
if ( exists $method_map{$what} ) { |
133
|
2
|
|
|
|
|
14
|
goto $self->can( $method_map{$what} ); |
134
|
|
|
|
|
|
|
} |
135
|
1
|
|
|
|
|
6
|
return exception( |
136
|
|
|
|
|
|
|
ident => 'bad iteration method', |
137
|
|
|
|
|
|
|
message => 'The iteration method %{what_method}s is not a known way to iterate.', |
138
|
|
|
|
|
|
|
payload => { what_method => $what, }, |
139
|
|
|
|
|
|
|
); |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
sub _iterate_ebuilds { |
149
|
0
|
|
|
0
|
|
0
|
my ( $self, undef, $callback ) = @_; |
150
|
|
|
|
|
|
|
my $real_callback = sub { |
151
|
0
|
|
|
0
|
|
0
|
my (%package_config) = %{ $_[1] }; |
|
0
|
|
|
|
|
0
|
|
152
|
|
|
|
|
|
|
my $inner_callback = sub { |
153
|
0
|
|
|
|
|
0
|
my (%ebuild_config) = %{ $_[1] }; |
|
0
|
|
|
|
|
0
|
|
154
|
0
|
|
|
|
|
0
|
$self->$callback( { ( %package_config, %ebuild_config ) } ); |
155
|
0
|
|
|
|
|
0
|
}; |
156
|
0
|
|
|
|
|
0
|
$package_config{package}->_iterate_ebuilds( ebuilds => $inner_callback ); |
157
|
0
|
|
|
|
|
0
|
}; |
158
|
0
|
|
|
|
|
0
|
$self->_iterate_packages( packages => $real_callback ); |
159
|
0
|
|
|
|
|
0
|
return; |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
# categories = { /overlays/categories |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub _iterate_categories { |
171
|
2
|
|
|
2
|
|
4
|
my ( $self, undef, $callback ) = @_; |
172
|
|
|
|
|
|
|
my $real_callback = sub { |
173
|
4
|
|
|
4
|
|
5
|
my (%overlay_config) = %{ $_[1] }; |
|
4
|
|
|
|
|
15
|
|
174
|
|
|
|
|
|
|
my $inner_callback = sub { |
175
|
8
|
|
|
|
|
26051
|
my (%category_config) = %{ $_[1] }; |
|
8
|
|
|
|
|
31
|
|
176
|
8
|
|
|
|
|
45
|
$self->$callback( { ( %overlay_config, %category_config ) } ); |
177
|
4
|
|
|
|
|
18
|
}; |
178
|
4
|
|
|
|
|
18
|
$overlay_config{overlay}->_iterate_categories( categories => $inner_callback ); |
179
|
2
|
|
|
|
|
8
|
}; |
180
|
2
|
|
|
|
|
7
|
$self->_iterate_overlays( overlays => $real_callback ); |
181
|
2
|
|
|
|
|
9
|
return; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub _iterate_packages { |
191
|
1
|
|
|
1
|
|
3
|
my ( $self, undef, $callback ) = @_; |
192
|
|
|
|
|
|
|
my $real_callback = sub { |
193
|
4
|
|
|
4
|
|
5
|
my (%category_config) = %{ $_[1] }; |
|
4
|
|
|
|
|
19
|
|
194
|
|
|
|
|
|
|
my $inner_callback = sub { |
195
|
0
|
|
|
|
|
0
|
my (%package_config) = %{ $_[1] }; |
|
0
|
|
|
|
|
0
|
|
196
|
0
|
|
|
|
|
0
|
$self->$callback( { ( %category_config, %package_config ) } ); |
197
|
4
|
|
|
|
|
24
|
}; |
198
|
4
|
|
|
|
|
14
|
$category_config{category}->_iterate_packages( packages => $inner_callback ); |
199
|
1
|
|
|
|
|
5
|
}; |
200
|
1
|
|
|
|
|
4
|
$self->_iterate_categories( categories => $real_callback ); |
201
|
1
|
|
|
|
|
5
|
return; |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
# overlays = { /overlays } |
211
|
|
|
|
|
|
|
sub _iterate_overlays { |
212
|
2
|
|
|
2
|
|
4
|
my ( $self, undef, $callback ) = @_; |
213
|
2
|
|
|
|
|
50
|
my %overlays = $self->overlays; |
214
|
2
|
|
|
|
|
110
|
my $num_overlays = scalar keys %overlays; |
215
|
2
|
|
|
|
|
6
|
my $last_overlay = $num_overlays - 1; |
216
|
2
|
|
|
|
|
4
|
my $offset = 0; |
217
|
2
|
|
|
|
|
7
|
for my $overlay_name ( sort keys %overlays ) { |
218
|
4
|
|
|
|
|
8
|
local $_ = $overlays{$overlay_name}; |
219
|
|
|
|
|
|
|
$self->$callback( |
220
|
|
|
|
|
|
|
{ |
221
|
|
|
|
|
|
|
overlay_name => $overlay_name, |
222
|
4
|
|
|
|
|
26
|
overlay => $overlays{$overlay_name}, |
223
|
|
|
|
|
|
|
num_overlays => $num_overlays, |
224
|
|
|
|
|
|
|
last_overlay => $last_overlay, |
225
|
|
|
|
|
|
|
overlay_num => $offset, |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
); |
228
|
4
|
|
|
|
|
1492
|
$offset++; |
229
|
|
|
|
|
|
|
} |
230
|
2
|
|
|
|
|
6
|
return; |
231
|
|
|
|
|
|
|
} |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
my $_gentoo_overlay = Gentoo__Overlay_Overlay(); |
234
|
|
|
|
|
|
|
my $_path_class_dir = Dir(); |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
# This would be better in M:M:TypeCoercion |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
sub _add_overlay_object { |
245
|
7
|
|
|
7
|
|
14
|
my ( $self, $overlay, @rest ) = @_; |
246
|
|
|
|
|
|
|
|
247
|
7
|
100
|
|
|
|
26
|
if ( $_gentoo_overlay->check($overlay) ) { |
248
|
5
|
|
|
|
|
111
|
goto $self->can('_add_overlay_gentoo_object'); |
249
|
|
|
|
|
|
|
} |
250
|
2
|
100
|
|
|
|
31
|
if ( $_path_class_dir->check($overlay) ) { |
251
|
1
|
|
|
|
|
30
|
goto $self->can('_add_overlay_path_class'); |
252
|
|
|
|
|
|
|
} |
253
|
|
|
|
|
|
|
return exception( |
254
|
|
|
|
|
|
|
ident => 'bad overlay object type', |
255
|
|
|
|
|
|
|
message => <<'EOF', |
256
|
|
|
|
|
|
|
Unrecognised parameter object types passed to add_overlay. |
257
|
|
|
|
|
|
|
Expected: \n%{signatures}s. |
258
|
|
|
|
|
|
|
Got: [%{type}s]}. |
259
|
|
|
|
|
|
|
EOF |
260
|
|
|
|
|
|
|
payload => { |
261
|
3
|
|
|
|
|
13
|
signatures => ( join q{}, map { qq{ \$group->add_overlay( $_ );\n} } qw( Str Path::Tiny Gentoo::Overlay ) ), |
262
|
1
|
|
|
|
|
14
|
type => ( join q{,}, blessed $overlay, map { _type_print } @rest ), |
|
0
|
|
|
|
|
0
|
|
263
|
|
|
|
|
|
|
}, |
264
|
|
|
|
|
|
|
); |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
sub _add_overlay_gentoo_object { |
274
|
13
|
|
|
13
|
|
21
|
my ( $self, $overlay, ) = @_; |
275
|
13
|
|
|
|
|
47
|
$_gentoo_overlay->assert_valid($overlay); |
276
|
13
|
100
|
|
|
|
407
|
if ( $self->_has_overlay( $overlay->name ) ) { |
277
|
1
|
|
|
|
|
56
|
return exception( |
278
|
|
|
|
|
|
|
ident => 'overlay exists', |
279
|
|
|
|
|
|
|
message => 'The overlay named %{overlay_name}s is already added to this group.', |
280
|
|
|
|
|
|
|
payload => { overlay_name => $overlay->name }, |
281
|
|
|
|
|
|
|
); |
282
|
|
|
|
|
|
|
} |
283
|
12
|
|
|
|
|
2623
|
$self->_set_overlay( $overlay->name, $overlay ); |
284
|
12
|
|
|
|
|
1341
|
return; |
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
sub _add_overlay_path_class { ## no critic ( RequireArgUnpacking ) |
294
|
8
|
|
|
8
|
|
12
|
my ( $self, $path, ) = @_; |
295
|
8
|
|
|
|
|
20
|
$_path_class_dir->assert_valid($path); |
296
|
8
|
|
|
|
|
446
|
my $go = Gentoo::Overlay->new( path => $path, ); |
297
|
8
|
|
|
|
|
5609
|
@_ = ( $self, $go ); |
298
|
8
|
|
|
|
|
37
|
goto $self->can('_add_overlay_gentoo_object'); |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
sub _add_overlay_string_path { ## no critic ( RequireArgUnpacking ) |
308
|
7
|
|
|
7
|
|
12
|
my ( $self, $path_str, ) = @_; |
309
|
7
|
|
|
|
|
21
|
$_str->assert_valid($path_str); |
310
|
7
|
|
|
|
|
63
|
my $path = $_path_class_dir->coerce($path_str); |
311
|
7
|
|
|
|
|
2326
|
@_ = ( $self, $path ); |
312
|
7
|
|
|
|
|
31
|
goto $self->can('_add_overlay_path_class'); |
313
|
|
|
|
|
|
|
} |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
1; |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
__END__ |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
=pod |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=encoding UTF-8 |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
=head1 NAME |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
Gentoo::Overlay::Group - A collection of Gentoo::Overlay objects. |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
=head1 VERSION |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
version 1.000001 |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
=head1 SYNOPSIS |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
This is a wrapper around L<< C<Gentoo::Overlay>|Gentoo::Overlay >> that makes it easier to perform actions on a group of overlays. |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
my $group = Gentoo::Overlay::Group->new(); |
336
|
|
|
|
|
|
|
$group->add_overlay('/usr/portage'); |
337
|
|
|
|
|
|
|
$group->add_overlay('/usr/local/portage/'); |
338
|
|
|
|
|
|
|
$group->iterate( packages => sub { |
339
|
|
|
|
|
|
|
my ( $self, $context ) = @_; |
340
|
|
|
|
|
|
|
# Traverse-Order: |
341
|
|
|
|
|
|
|
# ::gentoo |
342
|
|
|
|
|
|
|
# category_a |
343
|
|
|
|
|
|
|
# package_a |
344
|
|
|
|
|
|
|
# package_b |
345
|
|
|
|
|
|
|
# category_b |
346
|
|
|
|
|
|
|
# package_a |
347
|
|
|
|
|
|
|
# package_b |
348
|
|
|
|
|
|
|
# ::hentoo |
349
|
|
|
|
|
|
|
# category_a |
350
|
|
|
|
|
|
|
# package_a |
351
|
|
|
|
|
|
|
# package_b |
352
|
|
|
|
|
|
|
# category_b |
353
|
|
|
|
|
|
|
# package_a |
354
|
|
|
|
|
|
|
# package_b |
355
|
|
|
|
|
|
|
}); |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=head1 METHODS |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=head2 add_overlay |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
$object->add_overlay( '/path/to/overlay' ); |
362
|
|
|
|
|
|
|
$object->add_overlay( Path::Tiny::path( '/path/to/overlay' ) ); |
363
|
|
|
|
|
|
|
$object->add_overlay( Gentoo::Overlay->new( path => '/path/to/overlay' ) ); |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
=head2 iterate |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
$object->iterate( ebuilds => sub { |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
}); |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=head1 ATTRIBUTE ACCESSORS |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head2 overlay_names |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
my @names = $object->overlay_names |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=head2 overlays |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
my @overlays = $object->overlays; |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=head2 get_overlay |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
my $overlay = $object->get_overlay('gentoo'); |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=head1 PRIVATE ATTRIBUTES |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
=head2 _overlays |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
isa => HashRef[ Gentoo__Overlay_Overlay ], ro, lazy |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
=head1 PRIVATE ATTRIBUTE ACCESSORS |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=head2 _has_overlay |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
if( $object->_has_overlay('gentoo') ){ |
397
|
|
|
|
|
|
|
Carp::croak('waah'); |
398
|
|
|
|
|
|
|
} |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
=head2 _set_overlay |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
$object->_set_overlay( 'gentoo' => $overlay_object ); |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
=head1 PRIVATE FUNCTIONS |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=head2 _type_print |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
Lightweight flat dumper optimized for displaying user parameters in a format similar to a method signature. |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
printf '[%s]', join q{,} , map { _type_print } @array |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
=head1 PRIVATE METHODS |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=head2 _iterate_ebuilds |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
$object->_iterate_ebuilds( ignored => sub { } ); |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=head2 _iterate_categories |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
$object->_iterate_categories( ignored => sub { } ); |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=head2 _iterate_packages |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
$object->_iterate_packages( ignored => sub { } ); |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=head2 _iterate_overlays |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
$object->_iterate_overlays( ignored => sub { } ); |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
=head2 _add_overlay_object |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
$groupobject->_add_overlay_object( $object ); |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=head2 _add_overlay_gentoo_object |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
$groupobject->_add_overlay_gentoo_object( $gentoo_object ); |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=head2 _add_overlay_path_class |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
$groupobject->_add_overlay_path_class( $path_class_object ); |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=head2 _add_overlay_string_path |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
$groupobject->_add_overlay_string_path( $path_string ); |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=head1 AUTHOR |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>. |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
455
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
=cut |