File Coverage

lib/Net/ISC/DHCPd/OMAPI/Group.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Net::ISC::DHCPd::OMAPI::Group;
2              
3             =head1 NAME
4              
5             Net::ISC::DHCPd::OMAPI::Group - OMAPI group class
6              
7             =head1 SEE ALSO
8              
9             L<Net::ISC::DHCPd::OMAPI::Actions>.
10             L<Net::ISC::DHCPd::OMAPI::Meta::Attribute>.
11              
12             =head1 SYNOPSIS
13              
14             use Net::ISC::DHCPd::OMAPI;
15              
16             $omapi = Net::ISC::DHCPd::OMAPI->new(...);
17             $omapi->connect
18             $group = $omapi->new_object("group", { $attr => $value });
19             $group->$attr($value); # same as in constructor
20             $group->read; # retrieve server information
21             $group->write; # write to server
22              
23             =cut
24              
25 1     1   5 use Net::ISC::DHCPd::OMAPI::Sugar;
  1         3  
  1         11  
26 1     1   1327 use Moose;
  1         2  
  1         9  
27              
28             with 'Net::ISC::DHCPd::OMAPI::Actions';
29              
30             =head1 ATTRIBUTES
31              
32             =head2 name
33              
34             $self->name($name);
35             $str = $self->name;
36              
37             The name of the group. All groups that are created using OMAPI must
38             have names, and the names must be unique among all groups.
39              
40             Actions: examine lookup modify.
41              
42             =cut
43              
44             omapi_attr name => (
45             isa => 'Str',
46             actions => [qw/examine lookup modify/],
47             );
48              
49             =head2 statements
50              
51             $self->statements(\@statements);
52             $self->statements("foo,bar");
53             $str = $self->statements;
54              
55             A list of statements in the format of the dhcpd.conf file that will be
56             executed whenever a message from a client whose host declaration
57             references this group is processed.
58              
59             Actions: examine lookup modify.
60              
61             =cut
62              
63             omapi_attr statements => (
64             isa => Statements,
65             actions => [qw/examine lookup modify/],
66             );
67              
68             =head1 ACKNOWLEDGEMENTS
69              
70             Most of the documentation is taken from C<dhcpd(8)>.
71              
72             =head1 COPYRIGHT & LICENSE
73              
74             =head1 AUTHOR
75              
76             See L<Net::ISC::DHCPd>.
77              
78             =cut
79             __PACKAGE__->meta->make_immutable;
80             1;