File Coverage

blib/lib/App/Config/Chronicle/Node.pm
Criterion Covered Total %
statement 6 8 75.0
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod n/a
total 8 13 61.5


line stmt bran cond sub pod time code
1             package App::Config::Chronicle::Node;
2              
3 1     1   395 use Moose;
  1         1  
  1         6  
4              
5             =head1 NAME
6              
7             App::Config::Chronicle::Node
8              
9             =head1 DESCRIPTION
10              
11             This module represents a node in app_config tree
12              
13             =head1 ATTRIBUTES
14              
15             =cut
16              
17             =head2 name
18              
19             short name of the node
20              
21             =cut
22              
23             has name => (
24             is => 'ro',
25             isa => 'Str',
26             required => 1,
27             );
28              
29             =head2 parent_path
30              
31             path in dot notation of the parent node.
32              
33             =cut
34              
35             has parent_path => (
36             is => 'ro',
37             isa => 'Str',
38             );
39              
40             =head2 path
41              
42             path in dot notation of the current node.
43              
44             =cut
45              
46             has path => (
47             is => 'ro',
48             isa => 'Str',
49             lazy_build => 1,
50             );
51              
52             sub _build_path {
53 0     0     my $self = shift;
54 0 0         return (($self->parent_path) ? $self->parent_path . '.' : '') . $self->name;
55             }
56              
57             =head2 definition
58              
59             definition of this node from definitions.yml
60              
61             =cut
62              
63             has 'definition' => (
64             is => 'ro',
65             isa => 'HashRef',
66             required => 1,
67             );
68              
69             has 'data_set' => (
70             is => 'ro',
71             required => 1,
72             );
73              
74 1     1   3842 no Moose;
  1         1  
  1         3  
75             __PACKAGE__->meta->make_immutable;
76              
77             1;