| 1 | package Data::Mapper::Adapter; | ||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use parent qw(Data::Mapper::Class); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 6 | ▶ | sub driver { | ||||||||
|
Subroutine
driver: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||
| 7 | 6 | my ($self, $driver) = @_; | |||||||||
| 8 | |||||||||||
| 9 | 6 | ▶ | if (defined $driver) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | 2 | $self->{driver} = $driver | |||||||||
| 11 | } | ||||||||||
| 12 | else { | ||||||||||
| 13 | 4 | ▶ | if (ref $self->{driver} eq 'CODE') { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 2 | $driver = $self->{driver}->(); | |||||||||
| 15 | } | ||||||||||
| 16 | else { | ||||||||||
| 17 | 2 | $driver = $self->{driver}; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 4 | ▶ | die 'You must set a driver first' if !defined $driver; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 5 | $driver; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 1 | ▶ | sub create { die 'create() method must be implemented by subclass' } | ||||||||
|
Subroutine
create: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 27 | 1 | ▶ | sub find { die 'find() method must be implemented by subclass' } | ||||||||
|
Subroutine
find: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 28 | 1 | ▶ | sub search { die 'search() method must be implemented by subclass' } | ||||||||
|
Subroutine
search: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 29 | 1 | ▶ | sub update { die 'update() method must be implemented by subclass' } | ||||||||
|
Subroutine
update: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 30 | 1 | ▶ | sub delete { die 'delete() method must be implemented by subclass' } | ||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 31 | 1 | ▶ | sub schemata { die 'schemata() method must be implemented by subclass' } | ||||||||
|
Subroutine
schemata: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 32 | |||||||||||
| 33 | 2 | !!1; | |||||||||