line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Mapper::Adapter; |
2
|
2
|
|
|
2
|
|
42860
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
78
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
4
|
2
|
|
|
2
|
|
828
|
use parent qw(Data::Mapper::Class); |
|
2
|
|
|
|
|
334
|
|
|
2
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub driver { |
7
|
6
|
|
|
6
|
0
|
1198
|
my ($self, $driver) = @_; |
8
|
|
|
|
|
|
|
|
9
|
6
|
100
|
|
|
|
11
|
if (defined $driver) { |
10
|
2
|
|
|
|
|
4
|
$self->{driver} = $driver |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
else { |
13
|
4
|
100
|
|
|
|
13
|
if (ref $self->{driver} eq 'CODE') { |
14
|
2
|
|
|
|
|
5
|
$driver = $self->{driver}->(); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
else { |
17
|
2
|
|
|
|
|
4
|
$driver = $self->{driver}; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
4
|
100
|
|
|
|
23
|
die 'You must set a driver first' if !defined $driver; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
5
|
|
|
|
|
13
|
$driver; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
0
|
47
|
sub create { die 'create() method must be implemented by subclass' } |
27
|
1
|
|
|
1
|
0
|
436
|
sub find { die 'find() method must be implemented by subclass' } |
28
|
1
|
|
|
1
|
0
|
454
|
sub search { die 'search() method must be implemented by subclass' } |
29
|
1
|
|
|
1
|
0
|
385
|
sub update { die 'update() method must be implemented by subclass' } |
30
|
1
|
|
|
1
|
0
|
378
|
sub delete { die 'delete() method must be implemented by subclass' } |
31
|
1
|
|
|
1
|
0
|
374
|
sub schemata { die 'schemata() method must be implemented by subclass' } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
!!1; |