line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LIVR::Contract::Exception; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
7
|
1
|
|
|
1
|
|
3461
|
use Data::Dumper; |
|
1
|
|
|
|
|
35334
|
|
|
1
|
|
|
|
|
709
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @CARP_NOT = (__PACKAGE__, 'LIVR::Contract'); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use overload |
12
|
3
|
|
|
3
|
|
1494
|
'bool' => sub {1}, |
13
|
0
|
|
|
0
|
|
0
|
'~~' => sub { $_[0]->isa($_[1]) }, |
14
|
0
|
|
|
0
|
|
0
|
'""' => sub { $_[0]->to_string }, |
15
|
1
|
|
|
1
|
|
21
|
fallback => 1; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
3
|
|
|
3
|
0
|
14
|
my ($class, %args) = @_; |
20
|
|
|
|
|
|
|
|
21
|
3
|
|
|
|
|
7
|
local $Carp::Internal{ (__PACKAGE__) } = 1; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
505
|
return bless { |
24
|
|
|
|
|
|
|
type => $args{type}, |
25
|
|
|
|
|
|
|
errors => $args{errors}, |
26
|
|
|
|
|
|
|
package => $args{package}, |
27
|
|
|
|
|
|
|
subname => $args{subname}, |
28
|
|
|
|
|
|
|
longmess => Carp::longmess(), |
29
|
|
|
|
|
|
|
}, $class; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub type { |
33
|
3
|
|
|
3
|
0
|
2013
|
return shift->{type}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub errors { |
37
|
3
|
|
|
3
|
0
|
21
|
return shift->{errors}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub package { |
41
|
3
|
|
|
3
|
0
|
14
|
return shift->{package}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub subname { |
45
|
3
|
|
|
3
|
0
|
14
|
return shift->{subname}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub longmess { |
49
|
0
|
|
|
0
|
0
|
|
return shift->{longmess}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub to_string { |
53
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
local $Data::Dumper::Indent = 0; |
56
|
0
|
|
|
|
|
|
my $errors_str = Data::Dumper->Dump([$self->errors], ['errors']); |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return "Wrong $self->{type} in package=[$self->{package}] subname=[$self->{subname}]. $errors_str"; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |