| 1 | package MojoX::Plugin::AnyCache::Backend; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 5 | ▶ | use Mojo::Base '-base'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 5 | has 'config'; | |||||||||||||||||||||||||||
| 8 | 0 | ▶ | has 'support_sync' => sub { 0 }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 9 | 0 | ▶ | has 'support_async' => sub { 0 }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||
| 10 | 5 | has 'serialiser'; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 70 | ▶ | sub get_serialiser { | ||||||||||||||||||||||||||
|
Subroutine
get_serialiser: called CC=6 SCAR=18.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 13 | 70 | my ($self) = @_; | |||||||||||||||||||||||||||
| 14 | 70 | ▶ | if(!$self->serialiser && (my $s = $self->config->{serialiser})) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not $self->serialiser and my $s = $self->config->{"serialiser"}
MC/DC100%2/2
not $self->serialiser and my $s = $self->config->{"serialiser"}
not $self->serialiser
my $s = $self->config->{"serialiser"}
Truth table100%3/3
not(A) and B
A= not $self->serialiserB= my $s = $self->config->{"serialiser"}
| |||||||||||||||||||||||||||||
| 15 | 6 | eval { | |||||||||||||||||||||||||||
| 16 | 6 | eval "require $s;"; | |||||||||||||||||||||||||||
| 17 | 6 | ▶ | warn("Require failed: $@") if $self->config->{debug} && $@; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->config->{"debug"} and $@
MC/DC0%0/2
$self->config->{"debug"} and $@
$self->config->{"debug"}
$@
Truth table33%1/3
A and B
A= $self->config->{"debug"}B= $@
| |||||||||||||||||||||||||||||
| 18 | 6 | my $serialiser = $self->config->{serialiser}->new; | |||||||||||||||||||||||||||
| 19 | 6 | $serialiser->config($self->config); | |||||||||||||||||||||||||||
| 20 | 6 | $self->serialiser($serialiser); | |||||||||||||||||||||||||||
| 21 | }; | ||||||||||||||||||||||||||||
| 22 | 6 | ▶ | die("Failed to load serialiser $s: $@") if $@; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | 70 | return $self->serialiser; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 0 | ▶ | sub get { die("Must be overridden in backend module") }; | ||||||||||||||||||||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub set { die("Must be overridden in backend module") }; | ||||||||||||||||||||||||||
|
Subroutine
set: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | 0 | ▶ | sub incr { die("Must be overridden in backend module") }; | ||||||||||||||||||||||||||
|
Subroutine
incr: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | 0 | ▶ | sub decr { die("Must be overridden in backend module") }; | ||||||||||||||||||||||||||
|
Subroutine
decr: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 31 | 0 | ▶ | sub del { die("Must be overridden in backend module") }; | ||||||||||||||||||||||||||
|
Subroutine
del: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 5 | 1; | |||||||||||||||||||||||||||