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
|
4
|
|
|
4
|
|
25
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
5069
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new |
17
|
|
|
|
|
|
|
{ |
18
|
134
|
|
|
134
|
1
|
232
|
my ( $proto ) = @_; |
19
|
134
|
|
33
|
|
|
589
|
my $class = ref( $proto ) || $proto; |
20
|
134
|
|
|
|
|
252
|
my $self = {}; |
21
|
134
|
|
|
|
|
307
|
bless ( $self, $class ); |
22
|
134
|
|
|
|
|
353
|
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
|
134
|
|
|
134
|
0
|
695
|
my ( $self, $p_created_at ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
134
|
|
|
|
|
367
|
$self->{_Created_At} = $p_created_at; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_accessed_at |
42
|
|
|
|
|
|
|
{ |
43
|
20
|
|
|
20
|
0
|
28
|
my ( $self ) = @_; |
44
|
|
|
|
|
|
|
|
45
|
20
|
|
|
|
|
64
|
return $self->{_Accessed_At}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub set_accessed_at |
49
|
|
|
|
|
|
|
{ |
50
|
180
|
|
|
180
|
0
|
274
|
my ( $self, $p_accessed_at ) = @_; |
51
|
|
|
|
|
|
|
|
52
|
180
|
|
|
|
|
454
|
$self->{_Accessed_At} = $p_accessed_at; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub get_data |
57
|
|
|
|
|
|
|
{ |
58
|
50
|
|
|
50
|
0
|
152
|
my ( $self ) = @_; |
59
|
|
|
|
|
|
|
|
60
|
50
|
|
|
|
|
279
|
return $self->{_Data}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub set_data |
64
|
|
|
|
|
|
|
{ |
65
|
134
|
|
|
134
|
0
|
216
|
my ( $self, $p_data ) = @_; |
66
|
|
|
|
|
|
|
|
67
|
134
|
|
|
|
|
363
|
$self->{_Data} = $p_data; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub get_expires_at |
72
|
|
|
|
|
|
|
{ |
73
|
344
|
|
|
344
|
0
|
816
|
my ( $self ) = @_; |
74
|
|
|
|
|
|
|
|
75
|
344
|
|
|
|
|
2480
|
return $self->{_Expires_At}; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub set_expires_at |
80
|
|
|
|
|
|
|
{ |
81
|
134
|
|
|
134
|
0
|
547
|
my ( $self, $p_expires_at ) = @_; |
82
|
|
|
|
|
|
|
|
83
|
134
|
|
|
|
|
1611
|
$self->{_Expires_At} = $p_expires_at; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub get_key |
88
|
|
|
|
|
|
|
{ |
89
|
60
|
|
|
60
|
0
|
74
|
my ( $self ) = @_; |
90
|
|
|
|
|
|
|
|
91
|
60
|
|
|
|
|
228
|
return $self->{_Key}; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub set_key |
96
|
|
|
|
|
|
|
{ |
97
|
496
|
|
|
496
|
0
|
719
|
my ( $self, $p_key ) = @_; |
98
|
|
|
|
|
|
|
|
99
|
496
|
|
|
|
|
2702
|
$self->{_Key} = $p_key; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub get_size |
105
|
|
|
|
|
|
|
{ |
106
|
40
|
|
|
40
|
0
|
52
|
my ( $self ) = @_; |
107
|
|
|
|
|
|
|
|
108
|
40
|
|
|
|
|
131
|
return $self->{_Size}; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub set_size |
113
|
|
|
|
|
|
|
{ |
114
|
362
|
|
|
362
|
0
|
724
|
my ( $self, $p_size ) = @_; |
115
|
|
|
|
|
|
|
|
116
|
362
|
|
|
|
|
1126
|
$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__ |