line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::ParseError; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
629620
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
94
|
|
4
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
77
|
|
5
|
4
|
|
|
4
|
|
45
|
use Moo; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
23
|
|
6
|
4
|
|
|
4
|
|
1119
|
use Try::Tiny; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
210
|
|
7
|
4
|
|
|
4
|
|
24
|
use Module::Runtime 'use_module'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
24
|
|
8
|
4
|
|
|
4
|
|
154
|
use DBIx::Class::Exception; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
1232
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
11
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has _schema => ( |
14
|
|
|
|
|
|
|
is => 'ro', required => 1, init_arg => 'schema', |
15
|
|
|
|
|
|
|
handles => { _storage => 'storage' } |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has db_driver => ( |
19
|
|
|
|
|
|
|
is => 'lazy', init_arg => undef, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
4
|
|
|
4
|
|
121
|
sub _build_db_driver { shift->_storage->sqlt_type } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has _parser_class => ( |
25
|
|
|
|
|
|
|
is => 'lazy', builder => '_build_parser_class', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _build_parser_class { |
29
|
4
|
|
|
4
|
|
104
|
return join q{::}, 'DBIx::Class::ParseError::Parser', shift->db_driver; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has _parser => ( |
33
|
|
|
|
|
|
|
is => 'lazy', builder => '_build_parser', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub _build_parser { |
37
|
4
|
|
|
4
|
|
36
|
my $self = shift; |
38
|
|
|
|
|
|
|
return try { |
39
|
4
|
|
|
4
|
|
201
|
use_module($self->_parser_class)->new( |
40
|
|
|
|
|
|
|
schema => $self->_schema |
41
|
|
|
|
|
|
|
) |
42
|
4
|
|
|
0
|
|
28
|
} catch { die 'No parser found for ' . $self->_db_driver }; |
|
0
|
|
|
|
|
0
|
|
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub process { |
46
|
17
|
|
|
17
|
0
|
1877528
|
my ($self, $error) = @_; |
47
|
17
|
|
|
17
|
|
899
|
return try { $self->_parser->process($error) } |
48
|
17
|
|
|
0
|
|
128
|
catch { warn $_; DBIx::Class::Exception->throw($error) }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |