File Coverage

blib/lib/Error/Hierarchy/Internal.pm
Criterion Covered Total %
statement 21 21 100.0
branch 1 2 50.0
condition n/a
subroutine 8 8 100.0
pod 2 2 100.0
total 32 33 96.9


line stmt bran cond sub pod time code
1 2     2   1082 use 5.008;
  2         6  
  2         74  
2 2     2   10 use strict;
  2         5  
  2         52  
3 2     2   8 use warnings;
  2         4  
  2         81  
4              
5             package Error::Hierarchy::Internal;
6             BEGIN {
7 2     2   36 $Error::Hierarchy::Internal::VERSION = '1.103530';
8             }
9             # ABSTRACT: Base class for internal exceptions
10              
11 2     2   10 use parent 'Error::Hierarchy';
  2         2  
  2         17  
12 2     2   147 use constant PROPERTIES => (qw/package filename line/);
  2         4  
  2         335  
13 16     16 1 359 sub is_optional { 0 }
14              
15             sub stringify {
16 7     7 1 18051 my $self = shift;
17 7         30 my $message =
18             "Exception: package [%s], filename [%s], line [%s]: " . $self->message;
19 7 50       194 sprintf $message => map { defined($self->$_) ? $self->$_ : 'unknown' }
  27         3022  
20             $self->get_properties;
21             }
22             1;
23              
24              
25             __END__