Object.pm

filter: Statementstmt 79.4% 31 / 39 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 81.2% 13 / 16 Podpod 6.6% 1 / 15 totaltotal 61.3% 46 / 75 SCAR 7.2
CC
2
Cov
76%
new
2.1
get_created_at
2.0
get_identifier
2.0
CRAP 2.1
« BaseCacheTester.pm ↑ Summary NullCache.pm »
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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15  
16 sub new
17 {
18 134 ▶ my ( $proto ) = @_;
Subroutine new: called CC=2 SCAR=7.2
Pod documented
19 134 ▶ my $class = ref( $proto ) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
01340
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
20 134 my $self = {};
21 134 bless ( $self, $class );
22 134 return $self;
23 }
24  
25  
26 sub get_created_at
27 {
28 0 ▶ my ( $self ) = @_;
Subroutine get_created_at: not called CC=1 SCAR=6.9
Pod undocumented
29  
30 0 return $self->{_Created_At};
31 }
32  
33 sub set_created_at
34 {
35 134 ▶ my ( $self, $p_created_at ) = @_;
Subroutine set_created_at: called CC=1 SCAR=0.0
Pod undocumented
36  
37 134 $self->{_Created_At} = $p_created_at;
38 }
39  
40  
41 sub get_accessed_at
42 {
43 20 ▶ my ( $self ) = @_;
Subroutine get_accessed_at: called CC=1 SCAR=0.0
Pod undocumented
44  
45 20 return $self->{_Accessed_At};
46 }
47  
48 sub set_accessed_at
49 {
50 180 ▶ my ( $self, $p_accessed_at ) = @_;
Subroutine set_accessed_at: called CC=1 SCAR=0.0
Pod undocumented
51  
52 180 $self->{_Accessed_At} = $p_accessed_at;
53 }
54  
55  
56 sub get_data
57 {
58 50 ▶ my ( $self ) = @_;
Subroutine get_data: called CC=1 SCAR=0.0
Pod undocumented
59  
60 50 return $self->{_Data};
61 }
62  
63 sub set_data
64 {
65 134 ▶ my ( $self, $p_data ) = @_;
Subroutine set_data: called CC=1 SCAR=0.0
Pod undocumented
66  
67 134 $self->{_Data} = $p_data;
68 }
69  
70  
71 sub get_expires_at
72 {
73 344 ▶ my ( $self ) = @_;
Subroutine get_expires_at: called CC=1 SCAR=0.0
Pod undocumented
74  
75 344 return $self->{_Expires_At};
76 }
77  
78  
79 sub set_expires_at
80 {
81 134 ▶ my ( $self, $p_expires_at ) = @_;
Subroutine set_expires_at: called CC=1 SCAR=0.0
Pod undocumented
82  
83 134 $self->{_Expires_At} = $p_expires_at;
84 }
85  
86  
87 sub get_key
88 {
89 60 ▶ my ( $self ) = @_;
Subroutine get_key: called CC=1 SCAR=0.0
Pod undocumented
90  
91 60 return $self->{_Key};
92 }
93  
94  
95 sub set_key
96 {
97 496 ▶ my ( $self, $p_key ) = @_;
Subroutine set_key: called CC=1 SCAR=0.0
Pod undocumented
98  
99 496 $self->{_Key} = $p_key;
100 }
101  
102  
103  
104 sub get_size
105 {
106 40 ▶ my ( $self ) = @_;
Subroutine get_size: called CC=1 SCAR=0.0
Pod undocumented
107  
108 40 return $self->{_Size};
109 }
110  
111  
112 sub set_size
113 {
114 362 ▶ my ( $self, $p_size ) = @_;
Subroutine set_size: called CC=1 SCAR=0.0
Pod undocumented
115  
116 362 $self->{_Size} = $p_size;
117 }
118  
119  
120 sub get_identifier
121 {
122 0 ▶ my ( $self ) = @_;
Subroutine get_identifier: not called CC=1 SCAR=6.9
Pod undocumented
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 ▶ my ( $self, $p_identifier ) = @_;
Subroutine set_identifier: not called CC=1 SCAR=6.9
Pod undocumented
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 4 1;
143  
144  
145 __END__
« BaseCacheTester.pm ↑ Summary NullCache.pm »