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         10  
  4         144  
4              
5 4     4   22 use strict;
  4         6  
  4         108  
6 4     4   17 use warnings;
  4         7  
  4         77  
7              
8 4     4   18 use Carp;
  4         11  
  4         681  
9              
10             our $VERSION = '0.000_01';
11              
12             our $CONFIG ||= {};
13              
14             sub new {
15 16     16 1 538 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         34 return bless { %{ $CONFIG } }, __PACKAGE__;
  16         97  
20             }
21              
22             sub read {
23 3     3 1 701 my ( $class, $file ) = @_;
24 3         8 return $class->new();
25             }
26              
27              
28             1;
29              
30             __END__