DHCPd/Config/Root.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« DHCPd/Config/Pool.pm ↑ Summary DHCPd/Leases/Lease.pm »
1 package Net::ISC::DHCPd::Config::Root;
2  
3 =head1 NAME
4  
5 Net::ISC::DHCPd::Config::Root - Role for root config classes
6  
7 =head1 DESCRIPTION
8  
9 This role is applied to root classes, such as L<Net::ISC::DHCPd::Config>
10 and L<Net::ISC::DHCPd::Config::Include>.
11  
12 =cut
13  
14 27 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 27 ▶use MooseX::Types::Path::Class 0.05 qw(File);
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 27 with 'Net::ISC::DHCPd::Config::Role';
18  
19 =head1 ATTRIBUTES
20  
21 =head2 file
22  
23 This attribute holds a L<Path::Class::File> object representing
24 path to a config file. Default value is "/etc/dhcp3/dhcpd.conf".
25  
26 =cut
27  
28  
29 27 has fh => (
30 is => 'rw',
31 isa => 'FileHandle',
32 required => 0,
33 );
34  
35 has file => (
36 is => 'rw',
37 isa => File,
38 coerce => 1,
39 18 ▶ default => sub { Path::Class::File->new('', 'etc', 'dhcp3', 'dhcpd.conf') },
Subroutine __ANON__: called CC=1 SCAR=0.0
40 27 );
41  
42 =head1 METHODS
43  
44 =head2 generate
45  
46 Will use L<Net::ISC::DHCPd::Config::Role/generate_config_from_children>
47 to convert the object graph into text.
48  
49 =cut
50  
51 17 ▶sub generate {
Subroutine generate: called CC=1 SCAR=0.0
Pod documented
52 17 shift->generate_config_from_children ."\n";
53 }
54  
55 =head1 COPYRIGHT & LICENSE
56  
57 =head1 AUTHOR
58  
59 See L<Net::ISC::DHCPd>.
60  
61 =cut
62  
63 27 1;
« DHCPd/Config/Pool.pm ↑ Summary DHCPd/Leases/Lease.pm »