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
|
24
|
|
|
24
|
|
39478
|
use Moose::Role; |
|
24
|
|
|
|
|
123341
|
|
|
24
|
|
|
|
|
164
|
|
15
|
24
|
|
|
24
|
|
172541
|
use MooseX::Types::Path::Class qw(File); |
|
24
|
|
|
|
|
3119205
|
|
|
24
|
|
|
|
|
308
|
|
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
|
17
|
|
|
17
|
1
|
869
|
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; |