line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::Driver::Role::Universal; |
2
|
|
|
|
|
|
|
$CHI::Driver::Role::Universal::VERSION = '0.61'; |
3
|
20
|
|
|
20
|
|
156
|
use CHI::Constants qw(CHI_Meta_Namespace); |
|
20
|
|
|
|
|
43
|
|
|
20
|
|
|
|
|
1255
|
|
4
|
20
|
|
|
20
|
|
135
|
use Moo::Role; |
|
20
|
|
|
|
|
44
|
|
|
20
|
|
|
|
|
134
|
|
5
|
20
|
|
|
20
|
|
6709
|
use strict; |
|
20
|
|
|
|
|
48
|
|
|
20
|
|
|
|
|
537
|
|
6
|
20
|
|
|
20
|
|
114
|
use warnings; |
|
20
|
|
|
|
|
40
|
|
|
20
|
|
|
|
|
3738
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
around 'get_namespaces' => sub { |
9
|
|
|
|
|
|
|
my $orig = shift; |
10
|
|
|
|
|
|
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Call driver get_namespaces, then filter out meta-namespace |
13
|
|
|
|
|
|
|
return grep { $_ ne CHI_Meta_Namespace } $self->$orig(@_); |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
foreach my $method (qw(remove append)) { |
17
|
|
|
|
|
|
|
around $method => sub { |
18
|
|
|
|
|
|
|
my ( $orig, $self, $key, @rest ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Call transform_key before passing to method |
21
|
|
|
|
|
|
|
return $self->$orig( $self->transform_key($key), @rest ); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |