File Coverage

blib/lib/Test/Unit/Error.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 13 14 92.8


line stmt bran cond sub pod time code
1             package Test::Unit::Error;
2 2     2   11 use strict;
  2         3  
  2         438  
3 2     2   11 use base qw(Test::Unit::Exception);
  2         3  
  2         1998  
4              
5             # This is a hack to effectively rebless an unknown user exception as a
6             # Test::Unit::Error, which is nice because all Test::Unit::Exceptions
7             # have nice stringify() methods.
8             sub make_new_from_error {
9 12     12 0 24 my $self = shift;
10 12         21 my $ex = shift;
11 12         19 my $object = shift;
12 12         69 $self->new(%$ex, -object => $object);
13             }
14              
15             1;
16             __END__