| 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 | 18 | use strict; | |||
| 4 | 6 | ||||||
| 4 | 143 | ||||||
| 4 | 4 | 4 | 15 | use warnings; | |||
| 4 | 3 | ||||||
| 4 | 356 | ||||||
| 5 | |||||||
| 6 | sub new { | ||||||
| 7 | |||||||
| 8 | 188 | 188 | 0 | 392 | my ( $self, %args ) = @_; | ||
| 9 | |||||||
| 10 | 188 | 33 | 1357 | return bless( \%args, ( ref( $self ) || $self ) ); | |||
| 11 | } | ||||||
| 12 | |||||||
| 13 | sub throw { | ||||||
| 14 | |||||||
| 15 | 151 | 151 | 0 | 351 | my ( $self, @rest ) = @_; | ||
| 16 | |||||||
| 17 | 151 | 50 | 241 | if( ref $self ) { | |||
| 18 | |||||||
| 19 | 0 | 0 | die( $self ); | ||||
| 20 | |||||||
| 21 | } else { | ||||||
| 22 | |||||||
| 23 | 151 | 283 | die( $self -> new( @rest ) ); | ||||
| 24 | } | ||||||
| 25 | } | ||||||
| 26 | |||||||
| 27 | 1; | ||||||
| 28 | |||||||
| 29 | __END__ |