line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::ISC::DHCPd::Config::Root; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Net::ISC::DHCPd::Config::Root - Role for root config classes |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This role is applied to root classes, such as L<Net::ISC::DHCPd::Config> |
10
|
|
|
|
|
|
|
and L<Net::ISC::DHCPd::Config::Include>. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
21
|
|
|
21
|
|
20492
|
use Moose::Role; |
|
21
|
|
|
|
|
68968
|
|
|
21
|
|
|
|
|
104
|
|
15
|
21
|
|
|
21
|
|
101595
|
use MooseX::Types::Path::Class 0.05 qw(File); |
|
21
|
|
|
|
|
1952808
|
|
|
21
|
|
|
|
|
159
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with 'Net::ISC::DHCPd::Config::Role'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 file |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This attribute holds a L<Path::Class::File> object representing |
24
|
|
|
|
|
|
|
path to a config file. Default value is "/etc/dhcp3/dhcpd.conf". |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has fh => ( |
30
|
|
|
|
|
|
|
is => 'rw', |
31
|
|
|
|
|
|
|
isa => 'FileHandle', |
32
|
|
|
|
|
|
|
required => 0, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has file => ( |
36
|
|
|
|
|
|
|
is => 'rw', |
37
|
|
|
|
|
|
|
isa => File, |
38
|
|
|
|
|
|
|
coerce => 1, |
39
|
|
|
|
|
|
|
default => sub { Path::Class::File->new('', 'etc', 'dhcp3', 'dhcpd.conf') }, |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 generate |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Will use L<Net::ISC::DHCPd::Config::Role/generate_config_from_children> |
47
|
|
|
|
|
|
|
to convert the object graph into text. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub generate { |
52
|
0
|
|
|
0
|
1
|
|
shift->generate_config_from_children ."\n"; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
See L<Net::ISC::DHCPd>. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |