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

filter: Statementstmt 100% 6 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 8 / 8 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package Catalyst::Plugin::Cache::BerkeleyDB;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use base qw/Class::Data::Inheritable/;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 use Cache::BerkeleyDB;
5  
6 our $VERSION= '0.01';
7  
8 sub setup {
9 my $self = shift;
10  
11 my $params = $self->config->{cache} || {};
12 $params->{cache_root} = delete $params->{storage} if $params->{storage};
13 $params->{default_expires_in} = delete $params->{expires} if $params->{expires};
14 $params->{namespace} ||= $self;
15  
16 __PACKAGE__->mk_classdata(cache => Cache::BerkeleyDB->new($params));
17  
18 $self->NEXT::setup(@_);
19 }
20  
21 1;
22  
23 __END__
↑ Summary