DHCPd/OMAPI/Meta/Attribute.pm

filter: Statementstmt 66.6% 6 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 69.2% 9 / 13 CC 1 SCAR 2.9
CC
1
Cov
67%
has_action
2.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.3
« DHCPd/Config/Conditional.pm ↑ Summary DHCPd/OMAPI/Failover.pm »
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 7 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 36 ▶ default => sub { [] },
Subroutine __ANON__: called CC=1 SCAR=0.0
29 7 );
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 0 ▶sub has_action {
Subroutine has_action: not called CC=1 SCAR=6.9
Pod documented
42 0 return grep { $_[1] eq $_ } @{ $_[0]->actions };
43 }
44  
45 =head1 COPYRIGHT & LICENSE
46  
47 =head1 AUTHOR
48  
49 See L<Net::ISC::DHCPd>.
50  
51 =cut
52  
53 7 1;
« DHCPd/Config/Conditional.pm ↑ Summary DHCPd/OMAPI/Failover.pm »