File Coverage

blib/lib/ArangoDB/ClientException.pm
Criterion Covered Total %
statement 18 23 78.2
branch n/a
condition n/a
subroutine 6 8 75.0
pod 0 1 0.0
total 24 32 75.0


line stmt bran cond sub pod time code
1             package ArangoDB::ClientException;
2 8     8   55 use strict;
  8         19  
  8         351  
3 8     8   48 use warnings;
  8         19  
  8         259  
4 8     8   49 use utf8;
  8         18  
  8         61  
5 8     8   326 use 5.008001;
  8         34  
  8         448  
6 8     8   64 use Class::Accessor::Lite ( ro => [qw/message package file line subrutine/] );
  8         17  
  8         111  
7             use overload
8 0     0     q{""} => sub { $_[0]->message },
9 8     8   1517 fallback => 1;
  8         17  
  8         146  
10              
11             sub new {
12 0     0 0   my ( $class, $message ) = @_;
13 0           my @caller_info = caller;
14 0           my $self = bless {
15             message => $message,
16             package => $caller_info[0],
17             file => $caller_info[1],
18             line => $caller_info[2],
19             subrutine => $caller_info[3],
20             }, $class;
21 0           return $self;
22             }
23              
24             1;
25             __END__