CHI/Driver/Role/Universal.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 29 / 29 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« CHI/Driver/Role/IsSubcache.pm ↑ Summary CHI/Test/Driver/NonMoose.pm »
1 package CHI::Driver::Role::Universal;
2 20 $CHI::Driver::Role::Universal::VERSION = '0.59';
3 20 ▶use CHI::Constants qw(CHI_Meta_Namespace);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 20 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 around 'get_namespaces' => sub {
9 92 ▶ my $orig = shift;
Subroutine __ANON__: called CC=1 SCAR=0.0
10 92 my $self = shift;
11  
12 # Call driver get_namespaces, then filter out meta-namespace
13 92 return grep { $_ ne CHI_Meta_Namespace } $self->$orig(@_);
14 20 };
15  
16 20 foreach my $method (qw(remove append)) {
17 around $method => sub {
18 1683 ▶ my ( $orig, $self, $key, @rest ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
19  
20 # Call transform_key before passing to method
21 1683 return $self->$orig( $self->transform_key($key), @rest );
22 40 };
23 }
24  
25 20 1;
26  
27 __END__
« CHI/Driver/Role/IsSubcache.pm ↑ Summary CHI/Test/Driver/NonMoose.pm »