File Coverage

blib/lib/Dash/Config.pm
Criterion Covered Total %
statement 12 16 75.0
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 22 72.7


line stmt bran cond sub pod time code
1             package Dash::Config;
2              
3 6     6   39 use Moo;
  6         13  
  6         50  
4 6     6   2005 use strictures 2;
  6         63  
  6         231  
5 6     6   1170 use JSON;
  6         24  
  6         40  
6 6     6   3161 use namespace::clean;
  6         59685  
  6         35  
7              
8             has url_base_pathname => ( is => 'rw',
9             default => sub { JSON::null } );
10              
11             has requests_pathname_prefix => ( is => 'rw',
12             default => '/' );
13              
14             has ui => ( is => 'rw',
15             default => sub { JSON::false } );
16              
17             has props_check => ( is => 'rw',
18             default => sub { JSON::false } );
19              
20             has show_undo_redo => ( is => 'rw',
21             default => sub { JSON::false } );
22              
23             has hot_reload => ( is => 'rw' );
24              
25             has name => ( is => 'rw' );
26              
27             sub TO_JSON {
28 0     0 0   my $self = shift;
29             my %hash =
30 0           map { $_ => $self->{$_} } qw(url_base_pathname requests_pathname_prefix ui props_check show_undo_redo hot_reload);
  0            
31 0           return \%hash;
32             }
33              
34             1;
35              
36             __END__