This file is indexed.

/usr/share/perl5/DBI/Test/Case.pm is in libdbi-test-perl 0.001-1.

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package DBI::Test::Case;

use strict;
use warnings;

use DBI::Mock ();

sub requires_extended { 0 }

sub is_test_for_mocked
{
    my ( $self, $test_confs ) = @_;

    # allow DBD::NullP for DBI::Mock
    return ( $INC{'DBI.pm'} eq "mocked" and !scalar(@$test_confs) )
      || scalar grep { $_->{cat_abbrev} eq "m" } @$test_confs;
}

sub is_test_for_dbi
{
    my ( $self, $test_confs ) = @_;

    return ( -f $INC{'DBI.pm'} and !scalar(@$test_confs) )
      || scalar grep { $_->{cat_abbrev} eq "z" } @$test_confs;
}

sub filter_drivers
{
    my ( $self, $options, @test_dbds ) = @_;
    if ( $options->{CONTAINED_DBDS} )
    {
        my @contained_dbds =
          "ARRAY" eq ref( $options->{CONTAINED_DBDS} )
          ? @{ $options->{CONTAINED_DBDS} }
          : ( $options->{CONTAINED_DBDS} );
        my @supported_dbds;

        foreach my $test_dbd (@test_dbds)
        {
            @supported_dbds = ( @supported_dbds, grep { $test_dbd eq $_ } @contained_dbds );
        }

        return @supported_dbds;
    }

    return @test_dbds;
}

sub supported_variant
{
    my ( $self, $test_case, $cfg_pfx, $test_confs, $dsn_pfx, $dsn_cred, $options ) = @_;

    # allow only DBD::NullP for DBI::Mock
    if ( $self->is_test_for_mocked($test_confs) )
    {
        $dsn_cred or return 1;
        $dsn_cred->[0] eq 'dbi:NullP:' and return 1;
        return;
    }

    return 1;
}

1;