blib/lib/Net/ISC/DHCPd/Config/OptionSpace.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 14 SCAR 6.9
CC
1
Cov
0%
captured_to_args
2.0
generate
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::ISC::DHCPd::Config::OptionSpace;
2  
3 =head1 NAME
4  
5 Net::ISC::DHCPd::Config::OptionSpace - Optionspace 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 option space $name_attribute_value;
15  
16 =head1 SYNOPSIS
17  
18 See L<Net::ISC::DHCPd::Config/SYNOPSIS>.
19  
20 =cut
21  
22 use Moose;
23  
24 with 'Net::ISC::DHCPd::Config::Role';
25  
26 =head1 ATTRIBUTES
27  
28 =head2 name
29  
30 Name of the option namespace as a string.
31  
32 =cut
33  
34 has name => (
35 is => 'rw',
36 isa => 'Str',
37 );
38  
39 =head2 regex
40  
41 See L<Net::ISC::DHCPd::Config::Role/regex>.
42  
43 =cut
44 our $regex = qr{^\s* option \s+ space \s+ (.*) ;}x;
45  
46 =head1 METHODS
47  
48 =head2 captured_to_args
49  
50 See L<Net::ISC::DHCPd::Config::Role/captured_to_args>.
51  
52 =cut
53  
54 sub captured_to_args {
55 return { name => $_[0] }
56 }
57  
58 =head2 generate
59  
60 See L<Net::ISC::DHCPd::Config::Role/generate>.
61  
62 =cut
63  
64 sub generate {
65 return 'option space ' . shift->name. ';';
66 }
67  
68 =head1 COPYRIGHT & LICENSE
69  
70 =head1 AUTHOR
71  
72 See L<Net::ISC::DHCPd>.
73  
74 =cut
75 __PACKAGE__->meta->make_immutable;
76 1;