DHCPd/Config/Filename.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« DHCPd/Config/Class.pm ↑ Summary DHCPd/Config/Function.pm »
1 package Net::ISC::DHCPd::Config::Filename;
2  
3 =head1 NAME
4  
5 Net::ISC::DHCPd::Config::Filename - Filename 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 filename "$file_attribute_value";
15  
16 =head1 SYNOPSIS
17  
18 See L<Net::ISC::DHCPd::Config/SYNOPSIS>.
19  
20 =cut
21  
22 27 ▶use Moose 0.90;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 27 ▶use Path::Class::File 0.19;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 27 ▶use MooseX::Types::Path::Class 0.05 qw(File);
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 27 with 'Net::ISC::DHCPd::Config::Role';
27  
28 =head1 ATTRIBUTES
29  
30 =head2 file
31  
32 This attribute hold a L<Path::Class::File> object.
33  
34 =cut
35  
36 27 has file => (
37 is => 'rw',
38 isa => File,
39 coerce => 1,
40 );
41  
42 =head2 regex
43  
44 See L<Net::ISC::DHCPd::Config::Role/regex>.
45  
46 =cut
47  
48 27 our $regex = qr{^\s* filename \s+ (\S+) ;}x;
49  
50 =head1 METHODS
51  
52 =head2 captured_to_args
53  
54 See L<Net::ISC::DHCPd::Config::Role/captured_to_args>.
55  
56 =cut
57  
58 6 ▶sub captured_to_args {
Subroutine captured_to_args: called CC=1 SCAR=0.0
Pod documented
59 6 return { file => Path::Class::File->new($_[0]) };
60 }
61  
62 =head2 generate
63  
64 See L<Net::ISC::DHCPd::Config::Role/generate>.
65  
66 =cut
67  
68 2 ▶sub generate {
Subroutine generate: called CC=1 SCAR=0.0
Pod documented
69 2 return 'filename ' .shift->file .';';
70 }
71  
72 =head1 COPYRIGHT & LICENSE
73  
74 =head1 AUTHOR
75  
76 See L<Net::ISC::DHCPd>.
77  
78 =cut
79 27 __PACKAGE__->meta->make_immutable;
80 27 1;
« DHCPd/Config/Class.pm ↑ Summary DHCPd/Config/Function.pm »