line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Weaver::Config 4.018; |
2
|
|
|
|
|
|
|
# ABSTRACT: stored configuration loader role |
3
|
|
|
|
|
|
|
|
4
|
10
|
|
|
10
|
|
7138
|
use Moose::Role; |
|
10
|
|
|
|
|
27
|
|
|
10
|
|
|
|
|
100
|
|
5
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
59671
|
use Config::MVP 2; |
|
10
|
|
|
|
|
1540
|
|
|
10
|
|
|
|
|
303
|
|
7
|
10
|
|
|
10
|
|
4251
|
use Pod::Weaver::Config::Assembler; |
|
10
|
|
|
|
|
39
|
|
|
10
|
|
|
|
|
368
|
|
8
|
|
|
|
|
|
|
|
9
|
10
|
|
|
10
|
|
83
|
use namespace::autoclean; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
81
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
12
|
|
|
|
|
|
|
#pod |
13
|
|
|
|
|
|
|
#pod The config role provides some helpers for writing a configuration loader using |
14
|
|
|
|
|
|
|
#pod the L<Config::MVP|Config::MVP> system to load and validate its configuration. |
15
|
|
|
|
|
|
|
#pod |
16
|
|
|
|
|
|
|
#pod =attr assembler |
17
|
|
|
|
|
|
|
#pod |
18
|
|
|
|
|
|
|
#pod The L<assembler> attribute must be a Config::MVP::Assembler, has a sensible |
19
|
|
|
|
|
|
|
#pod default that will handle the standard needs of a config loader. Namely, it |
20
|
|
|
|
|
|
|
#pod will be pre-loaded with a starting section for root configuration. |
21
|
|
|
|
|
|
|
#pod |
22
|
|
|
|
|
|
|
#pod =cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub build_assembler { |
25
|
1
|
|
|
1
|
0
|
61
|
my $assembler = Pod::Weaver::Config::Assembler->new; |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
33
|
my $root = $assembler->section_class->new({ |
28
|
|
|
|
|
|
|
name => '_', |
29
|
|
|
|
|
|
|
}); |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
3168
|
$assembler->sequence->add_section($root); |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
345
|
return $assembler; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding UTF-8 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Pod::Weaver::Config - stored configuration loader role |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 VERSION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
version 4.018 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
The config role provides some helpers for writing a configuration loader using |
55
|
|
|
|
|
|
|
the L<Config::MVP|Config::MVP> system to load and validate its configuration. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 PERL VERSION SUPPORT |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This module has the same support period as perl itself: it supports the two |
60
|
|
|
|
|
|
|
most recent versions of perl. (That is, if the most recently released version |
61
|
|
|
|
|
|
|
is v5.40, then this module should work on both v5.40 and v5.38.) |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Although it may work on older versions of perl, no guarantee is made that the |
64
|
|
|
|
|
|
|
minimum required version will not be increased. The version may be increased |
65
|
|
|
|
|
|
|
for any reason, and there is no promise that patches will be accepted to lower |
66
|
|
|
|
|
|
|
the minimum required perl. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 assembler |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
The L<assembler> attribute must be a Config::MVP::Assembler, has a sensible |
73
|
|
|
|
|
|
|
default that will handle the standard needs of a config loader. Namely, it |
74
|
|
|
|
|
|
|
will be pre-loaded with a starting section for root configuration. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Ricardo SIGNES <rjbs@semiotic.systems> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Ricardo SIGNES. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
85
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |