line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::ISC::DHCPd::OMAPI::Meta::Attribute; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Net::ISC::DHCPd::OMAPI::Meta::Attribute - Attribute role for OMAPI attributes |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
|
13816
|
use Moose::Role; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
49
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head2 actions |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$array_ref = $attr->actions; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Actions possible to execute on attribute. Can be: |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
lookup |
20
|
|
|
|
|
|
|
examine |
21
|
|
|
|
|
|
|
update |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has actions => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
isa => 'ArrayRef', |
28
|
|
|
|
|
|
|
default => sub { [] }, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 has_action |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$bool = $attr->has_action($action_name); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Returns true if the attribute can execute C<$action_name>. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub has_action { |
42
|
0
|
|
|
0
|
1
|
|
return grep { $_[1] eq $_ } @{ $_[0]->actions }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 AUTHOR |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
See L<Net::ISC::DHCPd>. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |