line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::Driver::Role::Universal; |
2
|
|
|
|
|
|
|
$CHI::Driver::Role::Universal::VERSION = '0.60'; |
3
|
20
|
|
|
20
|
|
119
|
use CHI::Constants qw(CHI_Meta_Namespace); |
|
20
|
|
|
|
|
28
|
|
|
20
|
|
|
|
|
1208
|
|
4
|
20
|
|
|
20
|
|
94
|
use Moo::Role; |
|
20
|
|
|
|
|
29
|
|
|
20
|
|
|
|
|
106
|
|
5
|
20
|
|
|
20
|
|
7397
|
use strict; |
|
20
|
|
|
|
|
32
|
|
|
20
|
|
|
|
|
628
|
|
6
|
20
|
|
|
20
|
|
81
|
use warnings; |
|
20
|
|
|
|
|
32
|
|
|
20
|
|
|
|
|
2669
|
|
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__ |