File Coverage

blib/lib/Salvation/PluginCore/Object.pm
Criterion Covered Total %
statement 22 22 100.0
branch 3 4 75.0
condition 1 3 33.3
subroutine 7 7 100.0
pod n/a
total 33 36 91.6


line stmt bran cond sub pod time code
1             package Salvation::PluginCore::Object;
2              
3 1     1   4 use strict;
  1         1  
  1         23  
4 1     1   3 use warnings;
  1         0  
  1         16  
5              
6 1     1   358 use Salvation::Method::Signatures;
  1         76315  
  1         5  
7              
8 1     1   69545 method new() {
  3     3   51  
  3         6  
9              
10 3   33     16 return bless( {}, ( ref( $self ) || $self ) );
11             }
12              
13 1 50   1   684 method lazy( Str name ) {
  2     2   1  
  2         2  
  2         3  
  2         5  
  2         41  
14              
15 2 100       10 return $self -> { $name } if exists $self -> { $name };
16              
17 1         1 my $builder = "build_${name}";
18              
19 1         4 return $self -> { $name } = $self -> $builder();
20             }
21              
22             1;
23              
24             __END__