This file is indexed.

/usr/share/perl5/Cache/BaseCacheTester.pm is in libcache-cache-perl 1.06-2.

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
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
######################################################################
# $Id: BaseCacheTester.pm,v 1.7 2002/04/07 17:04:46 dclinton Exp $
# Copyright (C) 2001-2003 DeWitt Clinton  All Rights Reserved
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or
# implied. See the License for the specific language governing
# rights and limitations under the License.
######################################################################


package Cache::BaseCacheTester;


use strict;


sub new
{
  my ( $proto, $base_test_count ) = @_;
  my $class = ref( $proto ) || $proto;
  my $self  = {};
  bless ( $self, $class );

  $base_test_count = defined $base_test_count ? $base_test_count : 0 ;

  $self->_set_test_count( $base_test_count );

  return $self;
}


sub ok
{
  my ( $self ) = @_;

  my $test_count = $self->_get_test_count( );

  print "ok $test_count\n";

  $self->_increment_test_count( );
}


sub not_ok
{
  my ( $self, $message ) = @_;

  my $test_count = $self->_get_test_count( );

  print "not ok $test_count # failed '$message'\n";

  $self->_increment_test_count( );
}


sub skip
{
  my ( $self, $message ) = @_;

  my $test_count = $self->_get_test_count( );

  print "ok $test_count # skipped $message \n";

  $self->_increment_test_count( );
}


sub _set_test_count
{
  my ( $self, $test_count ) = @_;

  $self->{_Test_Count} = $test_count;
}


sub _get_test_count
{
  my ( $self ) = @_;

  return $self->{_Test_Count};
}


sub _increment_test_count
{
  my ( $self ) = @_;

  $self->{_Test_Count}++;
}


1;


__END__


=pod

=head1 NAME

Cache::BaseCacheTester -- abstract cache tester base class

=head1 DESCRIPTION

BaseCacheTester provides functionality common to all instances of a
class that will test cache implementations.

=head1 SYNOPSIS

BaseCacheTester provides functionality common to all instances of a
class that will test cache implementations.

  package Cache::MyCacheTester;

  use vars qw( @ISA );
  use Cache::BaseCacheTester;

  @ISA = qw( Cache::BaseCacheTester );

=head1 METHODS

=over

=item B<new( $base_test_count )>

Construct a new BaseCacheTester and initialize the test count to
I<$base_test_count>.

=item B<ok( )>

Print a message to stdout in the form "ok $test_count" and
incremements the test count.

=item B<not_ok( $message )>

Print a message to stdout in the form "not ok $test_count # I<$message> "
and incremements the test count.

=item B<skip( $message )>

Print a message to stdout in the form "ok $test_count # skipped I<$message> "
and incremements the test count.

=back

=head1 SEE ALSO

Cache::CacheTester, Cache::SizeAwareCacheTester

=head1 AUTHOR

Original author: DeWitt Clinton <dewitt@unto.net>

Last author:     $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

=cut