line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::t::Subclass; |
2
|
|
|
|
|
|
|
$CHI::t::Subclass::VERSION = '0.61'; |
3
|
1
|
|
|
1
|
|
399
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
403
|
use CHI::Test; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
11
|
use base qw(CHI::Test::Class); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
441
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Test declare_unsupported_methods |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
{ |
11
|
|
|
|
|
|
|
package CHI::t::Subclass::Driver::HasUnsupported; |
12
|
|
|
|
|
|
|
$CHI::t::Subclass::Driver::HasUnsupported::VERSION = '0.61'; |
13
|
1
|
|
|
1
|
|
8
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
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
|
1371
|
my $cache = CHI->new( |
20
|
|
|
|
|
|
|
driver_class => 'CHI::t::Subclass::Driver::HasUnsupported', |
21
|
|
|
|
|
|
|
global => 1 |
22
|
|
|
|
|
|
|
); |
23
|
1
|
|
|
1
|
|
9
|
lives_ok( sub { $cache->get_keys }, 'get_keys lives' ); |
|
1
|
|
|
|
|
46
|
|
24
|
|
|
|
|
|
|
throws_ok( |
25
|
1
|
|
|
1
|
|
62
|
sub { $cache->get_namespaces }, |
26
|
1
|
|
|
|
|
507
|
qr/method 'get_namespaces' not supported by 'CHI::t::Subclass::Driver::HasUnsupported'/, |
27
|
|
|
|
|
|
|
'get_namespaces dies' |
28
|
|
|
|
|
|
|
); |
29
|
1
|
|
|
1
|
|
460
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |