File Coverage

mock/Config/Tiny.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 2 2 100.0
total 25 25 100.0


line stmt bran cond sub pod time code
1             package Config::Tiny;
2              
3 4     4   50 use 5.008;
  4         9  
  4         146  
4              
5 4     4   17 use strict;
  4         4  
  4         96  
6 4     4   14 use warnings;
  4         4  
  4         78  
7              
8 4     4   13 use Carp;
  4         7  
  4         612  
9              
10             our $VERSION = '0.000_194';
11              
12             our $CONFIG ||= {};
13              
14             sub new {
15 16     16 1 428 my ( $class ) = @_;
16             # Because our configuration file may or may not exist under testing
17             # conditions, new() also needs to return $CONFIG, so that we get the
18             # desired result no matter which path we take through the code.
19 16         24 return bless { %{ $CONFIG } }, __PACKAGE__;
  16         75  
20             }
21              
22             sub read {
23 3     3 1 623 my ( $class, $file ) = @_;
24 3         8 return $class->new();
25             }
26              
27              
28             1;
29              
30             __END__