line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::StorageFactory; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
10197
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
165
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
129
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
17
|
use vars '$VERSION'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
162
|
|
7
|
|
|
|
|
|
|
$VERSION = '1.0'; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
21
|
use Carp (); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
646
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
6
|
|
|
6
|
1
|
5779
|
my ($class, %args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
6
|
|
|
|
|
12
|
for my $attribute (qw( storage type )) |
16
|
|
|
|
|
|
|
{ |
17
|
10
|
100
|
|
|
|
81
|
Carp::croak( "No $attribute specified" ) unless $args{$attribute}; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
|
|
12
|
bless \%args, $class; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub storage |
24
|
|
|
|
|
|
|
{ |
25
|
7
|
|
|
7
|
1
|
17034
|
my $self = shift; |
26
|
7
|
|
|
|
|
26
|
return $self->{storage}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub type |
30
|
|
|
|
|
|
|
{ |
31
|
5
|
|
|
5
|
1
|
6833
|
my $self = shift; |
32
|
5
|
|
|
|
|
20
|
return $self->{type}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub fetch |
36
|
|
|
|
|
|
|
{ |
37
|
1
|
|
|
1
|
1
|
6702
|
Carp::croak( 'Unimplemented method fetch called in parent class' ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub store |
41
|
|
|
|
|
|
|
{ |
42
|
1
|
|
|
1
|
1
|
1035
|
Carp::croak( 'Unimplemented method store called in parent class' ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
__END__ |