| 1 | package Net::ISC::DHCPd::Config::Pool; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Net::ISC::DHCPd::Config::Pool - Pool config parameter | ||
| 6 | |||
| 7 | =head1 DESCRIPTION | ||
| 8 | |||
| 9 | See L<Net::ISC::DHCPd::Config::Role> for methods and attributes without | ||
| 10 | documentation. | ||
| 11 | |||
| 12 | An instance from this class, comes from / will produce: | ||
| 13 | |||
| 14 | pool { | ||
| 15 | $keyvalue_attribute_value | ||
| 16 | $range_attribute_value | ||
| 17 | $options_attribute_value | ||
| 18 | } | ||
| 19 | |||
| 20 | =head1 SYNOPSIS | ||
| 21 | |||
| 22 | See L<Net::ISC::DHCPd::Config/SYNOPSIS>. | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | 27 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | |||
| 28 | 27 | with 'Net::ISC::DHCPd::Config::Role'; | |
| 29 | |||
| 30 | =head2 children | ||
| 31 | |||
| 32 | See L<Net::ISC::DHCPd::Config::Role/children>. | ||
| 33 | |||
| 34 | =cut | ||
| 35 | 62 | ▶ | sub children { |
|
Subroutine
children: called CC=1 SCAR=0.0
Pod
documented
| |||
| 36 | 62 | return qw/ | |
| 37 | Net::ISC::DHCPd::Config::Host | ||
| 38 | Net::ISC::DHCPd::Config::Option | ||
| 39 | Net::ISC::DHCPd::Config::Range | ||
| 40 | Net::ISC::DHCPd::Config::Range6 | ||
| 41 | Net::ISC::DHCPd::Config::KeyValue | ||
| 42 | /; | ||
| 43 | } | ||
| 44 | 27 | __PACKAGE__->create_children(__PACKAGE__->children()); | |
| 45 | |||
| 46 | =head1 ATTRIBUTES | ||
| 47 | |||
| 48 | =head2 options | ||
| 49 | |||
| 50 | A list of parsed L<Net::ISC::DHCPd::Config::Option> objects. | ||
| 51 | |||
| 52 | =head2 ranges | ||
| 53 | |||
| 54 | A list of parsed L<Net::ISC::DHCPd::Config::Range> objects. | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | =head2 regex | ||
| 59 | |||
| 60 | See L<Net::ISC::DHCPd::Config::Role/regex>. | ||
| 61 | |||
| 62 | =cut | ||
| 63 | 27 | our $regex = qr{^ \s* pool}x; | |
| 64 | |||
| 65 | =head1 METHODS | ||
| 66 | |||
| 67 | =head2 generate | ||
| 68 | |||
| 69 | See L<Net::ISC::DHCPd::Config::Role/generate>. | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||
| 73 | 3 | ▶ | sub generate { |
|
Subroutine
generate: called CC=1 SCAR=0.0
Pod
documented
| |||
| 74 | 3 | my $self = shift; | |
| 75 | 3 | return 'pool {', $self->_generate_config_from_children, '}'; | |
| 76 | } | ||
| 77 | |||
| 78 | =head1 COPYRIGHT & LICENSE | ||
| 79 | |||
| 80 | =head1 AUTHOR | ||
| 81 | |||
| 82 | See L<Net::ISC::DHCPd>. | ||
| 83 | |||
| 84 | =cut | ||
| 85 | 27 | __PACKAGE__->meta->make_immutable; | |
| 86 | 27 | 1; | |