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

filter: Statementstmt 0.0% 0 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 15 SCAR 6.9
CC
1
Cov
0%
generate
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
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 use Moose::Role;
15 use MooseX::Types::Path::Class 0.05 qw(File);
16  
17 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 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 default => sub { Path::Class::File->new('', 'etc', 'dhcp3', 'dhcpd.conf') },
40 );
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 sub generate {
52 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 1;