line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::t::Driver::File::DepthZero; |
2
|
|
|
|
|
|
|
$CHI::t::Driver::File::DepthZero::VERSION = '0.61'; |
3
|
1
|
|
|
1
|
|
501
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
392
|
use CHI::Test; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
6
|
1
|
|
|
1
|
|
802
|
use File::Temp qw(tempdir); |
|
1
|
|
|
|
|
18834
|
|
|
1
|
|
|
|
|
79
|
|
7
|
1
|
|
|
1
|
|
12
|
use File::Basename qw(dirname); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
99
|
|
8
|
1
|
|
|
1
|
|
8
|
use base qw(CHI::t::Driver::File); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
673
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Test file driver with zero depth |
11
|
|
|
|
|
|
|
|
12
|
102
|
|
|
102
|
0
|
997
|
sub testing_driver_class { 'CHI::Driver::File' } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new_cache_options { |
15
|
98
|
|
|
98
|
0
|
193
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
98
|
|
|
|
|
452
|
return ( $self->SUPER::new_cache_options(), depth => 0 ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub test_default_depth : Tests { |
21
|
1
|
|
|
1
|
0
|
728
|
my $self = shift; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
6
|
my $cache = $self->new_cache(); |
24
|
1
|
|
|
|
|
10
|
is( $cache->depth, 0 ); |
25
|
1
|
|
|
|
|
498
|
is( dirname( $cache->path_to_key('foo') ), |
26
|
|
|
|
|
|
|
$cache->path_to_namespace, "data files are one level below namespace" ); |
27
|
1
|
|
|
1
|
|
9
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |