AnyCache/Backend/Nop.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
get
2.0
set
2.0
incr
2.0
CRAP 2.0
1 package MojoX::Plugin::AnyCache::Backend::Nop;
2  
3 use strict;
4 use warnings;
5 use Mojo::Base 'MojoX::Plugin::AnyCache::Backend';
6  
7 has 'support_async' => sub { 1 };
8  
9 sub get {
10 my ($cb, $self) = (pop, shift);
11 $cb->();
12 }
13  
14 sub set {
15 my ($cb, $self, $key, $value, $ttl) = (pop, shift, shift, shift, shift);
16 $cb->();
17 }
18  
19 sub incr {
20 my ($cb, $self) = (pop, shift);
21 $cb->();
22 }
23  
24 sub decr {
25 my ($cb, $self) = (pop, shift);
26 $cb->();
27 }
28  
29 sub del {
30 my ($cb, $self) = (pop, shift);
31 $cb->();
32 }
33  
34 sub ttl {
35 my ($cb, $self, $key) = (pop, shift, shift);
36 $cb->(time);
37 }
38  
39 1;