blib/lib/Catalyst/Plugin/Cache/FastMmap.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package Catalyst::Plugin::Cache::FastMmap;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use MRO::Compat;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base 'Class::Data::Inheritable';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 use Cache::FastMmap;
9  
10 our $VERSION= '0.9';
11  
12 __PACKAGE__->mk_classdata('cache');
13  
14 sub setup {
15 my $self = shift;
16  
17 my %params = ();
18  
19 if ( $self->config->{cache} ) {
20 %params = %{ $self->config->{cache} };
21 }
22  
23 if ( $params{storage} ) {
24 $params{share_file} = delete $params{storage};
25 }
26  
27 if ( $params{expires} ) {
28 $params{expire_time} = delete $params{expires};
29 }
30  
31 $self->cache( Cache::FastMmap->new(%params) );
32  
33 return $self->next::method(@_);
34 }
35  
36 1;
37  
38  
39 __END__
↑ Summary