line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::t::Subclass; |
2
|
|
|
|
|
|
|
$CHI::t::Subclass::VERSION = '0.60'; |
3
|
1
|
|
|
1
|
|
314
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
5
|
1
|
|
|
1
|
|
409
|
use CHI::Test; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
4
|
use base qw(CHI::Test::Class); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
353
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Test declare_unsupported_methods |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
{ |
11
|
|
|
|
|
|
|
package CHI::t::Subclass::Driver::HasUnsupported; |
12
|
|
|
|
|
|
|
$CHI::t::Subclass::Driver::HasUnsupported::VERSION = '0.60'; |
13
|
1
|
|
|
1
|
|
8
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
14
|
|
|
|
|
|
|
extends 'CHI::Driver::Memory'; |
15
|
|
|
|
|
|
|
__PACKAGE__->declare_unsupported_methods(qw(get_namespaces)); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub test_unsupported : Tests { |
19
|
1
|
|
|
1
|
0
|
932
|
my $cache = CHI->new( |
20
|
|
|
|
|
|
|
driver_class => 'CHI::t::Subclass::Driver::HasUnsupported', |
21
|
|
|
|
|
|
|
global => 1 |
22
|
|
|
|
|
|
|
); |
23
|
1
|
|
|
1
|
|
12
|
lives_ok( sub { $cache->get_keys }, 'get_keys lives' ); |
|
1
|
|
|
|
|
52
|
|
24
|
|
|
|
|
|
|
throws_ok( |
25
|
1
|
|
|
1
|
|
72
|
sub { $cache->get_namespaces }, |
26
|
1
|
|
|
|
|
488
|
qr/method 'get_namespaces' not supported by 'CHI::t::Subclass::Driver::HasUnsupported'/, |
27
|
|
|
|
|
|
|
'get_namespaces dies' |
28
|
|
|
|
|
|
|
); |
29
|
1
|
|
|
1
|
|
488
|
} |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |