File Coverage

blib/lib/Salvation/TC/Exception.pm
Criterion Covered Total %
statement 11 12 91.6
branch 1 2 50.0
condition 1 3 33.3
subroutine 4 4 100.0
pod 0 2 0.0
total 17 23 73.9


line stmt bran cond sub pod time code
1             package Salvation::TC::Exception;
2              
3 4     4   20 use strict;
  4         7  
  4         121  
4 4     4   17 use warnings;
  4         6  
  4         362  
5              
6             sub new {
7              
8 184     184 0 339 my ( $self, %args ) = @_;
9              
10 184   33     1153 return bless( \%args, ( ref( $self ) || $self ) );
11             }
12              
13             sub throw {
14              
15 147     147 0 273 my ( $self, @rest ) = @_;
16              
17 147 50       204 if( ref $self ) {
18              
19 0         0 die( $self );
20              
21             } else {
22              
23 147         254 die( $self -> new( @rest ) );
24             }
25             }
26              
27             1;
28              
29             __END__