line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sman::Man::Cache; # has two subclasses: |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#$Id$ |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
407
|
use fields qw( none ); |
|
1
|
|
|
|
|
1006
|
|
|
1
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
1
|
|
|
1
|
0
|
1
|
my Sman::Man::Cache $self = shift; |
9
|
1
|
50
|
|
|
|
4
|
unless (ref $self) { |
10
|
0
|
|
|
|
|
0
|
$self = fields::new($self); |
11
|
|
|
|
|
|
|
#$self->{_Foo_private} = "this is Foo's secret"; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
#$self->{foo} = 10; |
14
|
|
|
|
|
|
|
#$self->{bar} = 20; |
15
|
1
|
|
|
|
|
1
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
#sub new { |
19
|
|
|
|
|
|
|
# my $proto = shift; |
20
|
|
|
|
|
|
|
# my $class = ref($proto) || $proto; |
21
|
|
|
|
|
|
|
# my $self = {}; |
22
|
|
|
|
|
|
|
# bless ($self, $class); |
23
|
|
|
|
|
|
|
# return $self; |
24
|
|
|
|
|
|
|
#} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub get { |
27
|
0
|
|
|
0
|
0
|
|
die "Must use subclass of __PACKAGE__"; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
sub set { |
30
|
0
|
|
|
0
|
0
|
|
die "Must use subclass of __PACKAGE__"; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#package Sman::Man::Cache::FileCache; |
34
|
|
|
|
|
|
|
#use fields qw( filecache ); |
35
|
|
|
|
|
|
|
# not needed |
36
|
|
|
|
|
|
|
# this uses Cache::FileCache |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Sman::Man::Cache - 'Virtual base class' for converted manpages cache |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This module provides an interface for subclasses, namely, |
47
|
|
|
|
|
|
|
Sman::Man::Cache::DB_File and Sman::Man::Cache::FileCache |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 DESCRIPTION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module provides an interface for subclasses, namely, |
52
|
|
|
|
|
|
|
Sman::Man::Cache::DB_File and Sman::Man::Cache::FileCache |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Josh Rabinowitz |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SEE ALSO |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
L, L, L, L |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|