line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Data::Seek Exception Class |
2
|
|
|
|
|
|
|
package Data::Seek::Exception; |
3
|
|
|
|
|
|
|
|
4
|
8
|
|
|
8
|
|
3290
|
use 5.10.0; |
|
8
|
|
|
|
|
27
|
|
|
8
|
|
|
|
|
475
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
40
|
use strict; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
218
|
|
7
|
8
|
|
|
8
|
|
48
|
use warnings; |
|
8
|
|
|
|
|
23
|
|
|
8
|
|
|
|
|
217
|
|
8
|
|
|
|
|
|
|
|
9
|
8
|
|
|
8
|
|
1697
|
use Mo 'builder'; |
|
8
|
|
|
|
|
1210
|
|
|
8
|
|
|
|
|
44
|
|
10
|
|
|
|
|
|
|
|
11
|
8
|
|
|
8
|
|
17853
|
use Data::Dumper (); |
|
8
|
|
|
|
|
74507
|
|
|
8
|
|
|
|
|
243
|
|
12
|
8
|
|
|
8
|
|
83
|
use Scalar::Util (); |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
253
|
|
13
|
|
|
|
|
|
|
|
14
|
8
|
|
|
8
|
|
40
|
use overload fallback => 1, '""' => \&as_string; |
|
8
|
|
|
|
|
1162
|
|
|
8
|
|
|
|
|
636
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.05'; # VERSION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has 'code'; |
19
|
|
|
|
|
|
|
has 'file'; |
20
|
|
|
|
|
|
|
has 'line'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has 'message', |
23
|
|
|
|
|
|
|
builder => '_build_message'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _build_message { |
26
|
1
|
|
|
1
|
|
2580
|
sprintf 'An unknown error occurred in class (%s)', |
27
|
|
|
|
|
|
|
ref shift |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has 'package'; |
31
|
|
|
|
|
|
|
has 'subroutine'; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub as_string { |
34
|
1
|
|
|
1
|
0
|
499
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
|
|
6
|
return sprintf "%s at %s line %s\n", |
37
|
|
|
|
|
|
|
$self->message, $self->file, $self->line; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub caught { |
41
|
0
|
|
|
0
|
0
|
0
|
my $class = shift; |
42
|
0
|
|
|
|
|
0
|
my $e = shift; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
0
|
|
|
0
|
return ! ref $class |
45
|
|
|
|
|
|
|
&& Scalar::Util::blessed($e) |
46
|
|
|
|
|
|
|
&& UNIVERSAL::isa($e, $class); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub dumper { |
50
|
0
|
|
|
0
|
0
|
0
|
local $Data::Dumper::Terse = 1; |
51
|
0
|
|
|
|
|
0
|
return Data::Dumper::Dumper(pop); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub rethrow { |
55
|
0
|
|
|
0
|
0
|
0
|
die shift; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub throw { |
59
|
15
|
|
|
15
|
0
|
3274
|
my ($class, %args) = @_; |
60
|
|
|
|
|
|
|
|
61
|
15
|
|
|
|
|
184
|
$args{subroutine} = (caller(1))[3]; |
62
|
15
|
|
|
|
|
110
|
$args{package} = (caller(0))[0]; |
63
|
15
|
|
|
|
|
86
|
$args{file} = (caller(0))[1]; |
64
|
15
|
|
|
|
|
82
|
$args{line} = (caller(0))[2]; |
65
|
|
|
|
|
|
|
|
66
|
15
|
|
|
|
|
134
|
die $class->new(%args); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub throw_subclass { |
70
|
1
|
|
|
1
|
0
|
3045
|
my ($class, $subspace, %args) = @_; |
71
|
1
|
|
|
|
|
4
|
my $subclass = join '::', $class, $subspace; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# gen exception sub-class dynamically if not loaded |
74
|
1
|
|
|
1
|
|
6
|
eval "package ${subclass}; use parent '@{[$class]}'; 1;"; |
|
1
|
|
|
|
|
102
|
|
|
1
|
|
|
|
|
1053
|
|
|
1
|
|
|
|
|
394
|
|
|
1
|
|
|
|
|
6
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
# throw generated exception |
77
|
1
|
|
|
|
|
6
|
@_ = ($class, %args); |
78
|
1
|
|
|
|
|
23
|
goto $subclass->can('throw'); |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |