/usr/share/perl5/Cache/Object.pm is in libcache-cache-perl 1.07-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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | ######################################################################
# $Id: Object.pm,v 1.8 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::Object;
use strict;
sub new
{
my ( $proto ) = @_;
my $class = ref( $proto ) || $proto;
my $self = {};
bless ( $self, $class );
return $self;
}
sub get_created_at
{
my ( $self ) = @_;
return $self->{_Created_At};
}
sub set_created_at
{
my ( $self, $p_created_at ) = @_;
$self->{_Created_At} = $p_created_at;
}
sub get_accessed_at
{
my ( $self ) = @_;
return $self->{_Accessed_At};
}
sub set_accessed_at
{
my ( $self, $p_accessed_at ) = @_;
$self->{_Accessed_At} = $p_accessed_at;
}
sub get_data
{
my ( $self ) = @_;
return $self->{_Data};
}
sub set_data
{
my ( $self, $p_data ) = @_;
$self->{_Data} = $p_data;
}
sub get_expires_at
{
my ( $self ) = @_;
return $self->{_Expires_At};
}
sub set_expires_at
{
my ( $self, $p_expires_at ) = @_;
$self->{_Expires_At} = $p_expires_at;
}
sub get_key
{
my ( $self ) = @_;
return $self->{_Key};
}
sub set_key
{
my ( $self, $p_key ) = @_;
$self->{_Key} = $p_key;
}
sub get_size
{
my ( $self ) = @_;
return $self->{_Size};
}
sub set_size
{
my ( $self, $p_size ) = @_;
$self->{_Size} = $p_size;
}
sub get_identifier
{
my ( $self ) = @_;
warn( "get_identifier has been marked deprepricated. use get_key" );
return $self->get_key( );
}
sub set_identifier
{
my ( $self, $p_identifier ) = @_;
warn( "set_identifier has been marked deprepricated. use set_key" );
return $self->set_key( $p_identifier );
}
1;
__END__
=pod
=head1 NAME
Cache::Object -- the data stored in a Cache.
=head1 DESCRIPTION
Object is used by classes implementing the Cache interface as an
object oriented wrapper around the data. End users will not normally
use Object directly, but it can be retrieved via the get_object method
on the Cache::Cache interface.
=head1 SYNOPSIS
use Cache::Object;
my $object = new Cache::Object( );
$object->set_key( $key );
$object->set_data( $data );
$object->set_expires_at( $expires_at );
$object->set_created_at( $created_at );
=head1 METHODS
=over
=item B<new( )>
Construct a new Cache::Object.
=back
=head1 PROPERTIES
=over
=item B<(get|set)_accessed_at>
The time at which the object was last accessed. Various cache
implementations will use the accessed_at property to store information
for LRU algorithms. There is no guarentee that all caches will update
this field, however.
=item B<(get|set)_created_at>
The time at which the object was created.
=item B<(get|set)_data>
A scalar containing or a reference pointing to the data to be stored.
=item B<(get|set)_expires_at>
The time at which the object should expire from the cache.
=item B<(get|set)_key>
The key under which the object was stored.
=item B<(get|set)_size>
The size of the frozen version of this object
=back
=head1 SEE ALSO
Cache::Cache
=head1 AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net>
Last author: $Author: dclinton $
Copyright (C) 2001-2003 DeWitt Clinton
=cut
|