This file is indexed.

/usr/share/perl5/CHI/t/Subcache.pm is in libchi-perl 0.60-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package CHI::t::Subcache;
$CHI::t::Subcache::VERSION = '0.60';
use CHI::Test;
use CHI::Util qw(can_load);
use base qw(CHI::Test::Class);
use strict;
use warnings;

sub test_option_inheritance : Tests {
    my $self = shift;

    return 'Data::Serializer not installed'
      unless can_load('Data::Serializer');

    my %params = (
        expires_variance => 0.2,
        namespace        => 'Blurg',
        on_get_error     => 'warn',
        on_set_error     => 'warn',
        serializer       => 'Data::Dumper',
        depth            => 4,
    );
    my $cache =
      CHI->new( driver => 'File', %params, l1_cache => { driver => 'File' } );
    foreach my $field (qw(expires_variance namespace on_get_error on_set_error))
    {
        is( $cache->$field, $cache->l1_cache->$field, "$field matches" );
    }
    is( $cache->l1_cache->serializer->serializer,
        'Data::Dumper', 'l1 cache serializer' );
    is( $cache->depth,           4, 'cache depth' );
    is( $cache->l1_cache->depth, 2, 'l1 cache depth' );
}

sub test_bad_subcache_option : Tests {
    my $self = shift;
    throws_ok(
        sub {
            CHI->new(
                driver   => 'Memory',
                global   => 1,
                l1_cache => CHI->new( driver => 'Memory', global => 1 )
            );
        },
        qr/Validation failed for|isa check for .*? failed/,
        'cannot pass cache object as subcache'
    );
}

1;