line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
###################################################################### |
2
|
|
|
|
|
|
|
# $Id: Object.pm,v 1.8 2002/04/07 17:04:46 dclinton Exp $ |
3
|
|
|
|
|
|
|
# Copyright (C) 2001-2003 DeWitt Clinton All Rights Reserved |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Software distributed under the License is distributed on an "AS |
6
|
|
|
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or |
7
|
|
|
|
|
|
|
# implied. See the License for the specific language governing |
8
|
|
|
|
|
|
|
# rights and limitations under the License. |
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Cache::Object; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1146
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new |
17
|
|
|
|
|
|
|
{ |
18
|
67
|
|
|
67
|
1
|
124
|
my ( $proto ) = @_; |
19
|
67
|
|
33
|
|
|
378
|
my $class = ref( $proto ) || $proto; |
20
|
67
|
|
|
|
|
171
|
my $self = {}; |
21
|
67
|
|
|
|
|
245
|
bless ( $self, $class ); |
22
|
67
|
|
|
|
|
199
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub get_created_at |
27
|
|
|
|
|
|
|
{ |
28
|
0
|
|
|
0
|
0
|
0
|
my ( $self ) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
0
|
return $self->{_Created_At}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub set_created_at |
34
|
|
|
|
|
|
|
{ |
35
|
67
|
|
|
67
|
0
|
99
|
my ( $self, $p_created_at ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
67
|
|
|
|
|
159
|
$self->{_Created_At} = $p_created_at; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_accessed_at |
42
|
|
|
|
|
|
|
{ |
43
|
10
|
|
|
10
|
0
|
13
|
my ( $self ) = @_; |
44
|
|
|
|
|
|
|
|
45
|
10
|
|
|
|
|
31
|
return $self->{_Accessed_At}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub set_accessed_at |
49
|
|
|
|
|
|
|
{ |
50
|
90
|
|
|
90
|
0
|
364
|
my ( $self, $p_accessed_at ) = @_; |
51
|
|
|
|
|
|
|
|
52
|
90
|
|
|
|
|
225
|
$self->{_Accessed_At} = $p_accessed_at; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub get_data |
57
|
|
|
|
|
|
|
{ |
58
|
25
|
|
|
25
|
0
|
37
|
my ( $self ) = @_; |
59
|
|
|
|
|
|
|
|
60
|
25
|
|
|
|
|
125
|
return $self->{_Data}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub set_data |
64
|
|
|
|
|
|
|
{ |
65
|
67
|
|
|
67
|
0
|
99
|
my ( $self, $p_data ) = @_; |
66
|
|
|
|
|
|
|
|
67
|
67
|
|
|
|
|
198
|
$self->{_Data} = $p_data; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub get_expires_at |
72
|
|
|
|
|
|
|
{ |
73
|
172
|
|
|
172
|
0
|
239
|
my ( $self ) = @_; |
74
|
|
|
|
|
|
|
|
75
|
172
|
|
|
|
|
937
|
return $self->{_Expires_At}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub set_expires_at |
80
|
|
|
|
|
|
|
{ |
81
|
67
|
|
|
67
|
0
|
122
|
my ( $self, $p_expires_at ) = @_; |
82
|
|
|
|
|
|
|
|
83
|
67
|
|
|
|
|
190
|
$self->{_Expires_At} = $p_expires_at; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub get_key |
88
|
|
|
|
|
|
|
{ |
89
|
30
|
|
|
30
|
0
|
33
|
my ( $self ) = @_; |
90
|
|
|
|
|
|
|
|
91
|
30
|
|
|
|
|
125
|
return $self->{_Key}; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub set_key |
96
|
|
|
|
|
|
|
{ |
97
|
248
|
|
|
248
|
0
|
371
|
my ( $self, $p_key ) = @_; |
98
|
|
|
|
|
|
|
|
99
|
248
|
|
|
|
|
730
|
$self->{_Key} = $p_key; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub get_size |
105
|
|
|
|
|
|
|
{ |
106
|
20
|
|
|
20
|
0
|
23
|
my ( $self ) = @_; |
107
|
|
|
|
|
|
|
|
108
|
20
|
|
|
|
|
67
|
return $self->{_Size}; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub set_size |
113
|
|
|
|
|
|
|
{ |
114
|
181
|
|
|
181
|
0
|
275
|
my ( $self, $p_size ) = @_; |
115
|
|
|
|
|
|
|
|
116
|
181
|
|
|
|
|
688
|
$self->{_Size} = $p_size; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub get_identifier |
121
|
|
|
|
|
|
|
{ |
122
|
0
|
|
|
0
|
0
|
|
my ( $self ) = @_; |
123
|
|
|
|
|
|
|
|
124
|
0
|
|
|
|
|
|
warn( "get_identifier has been marked deprepricated. use get_key" ); |
125
|
|
|
|
|
|
|
|
126
|
0
|
|
|
|
|
|
return $self->get_key( ); |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub set_identifier |
131
|
|
|
|
|
|
|
{ |
132
|
0
|
|
|
0
|
0
|
|
my ( $self, $p_identifier ) = @_; |
133
|
|
|
|
|
|
|
|
134
|
0
|
|
|
|
|
|
warn( "set_identifier has been marked deprepricated. use set_key" ); |
135
|
|
|
|
|
|
|
|
136
|
0
|
|
|
|
|
|
return $self->set_key( $p_identifier ); |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
1; |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
__END__ |