File Coverage

blib/lib/Test/Unit/Error.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 15 16 93.7


line stmt bran cond sub pod time code
1             package Test::Unit::Error;
2             BEGIN {
3 2     2   43 $Test::Unit::Error::VERSION = '0.25_1325'; # added by dist-tools/SetVersion.pl
4             }
5 2     2   10 use strict;
  2         4  
  2         58  
6 2     2   10 use base qw(Test::Unit::Exception);
  2         9  
  2         1041  
7              
8             # This is a hack to effectively rebless an unknown user exception as a
9             # Test::Unit::Error, which is nice because all Test::Unit::Exceptions
10             # have nice stringify() methods.
11             sub make_new_from_error {
12 12     12 0 28 my $self = shift;
13 12         22 my $ex = shift;
14 12         18 my $object = shift;
15 12         87 $self->new(%$ex, -object => $object);
16             }
17              
18             1;
19             __END__