Session/DB_File.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 40 CC 1 SCAR 6.9
CC
1
Cov
0%
populate
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #############################################################################
2 #
3 # Apache::Session::DB_File
4 # A wrapper class
5 # Copyright(c) 2000 Jeffrey William Baker (jwbaker@acm.org)
6 # Distribute under the Perl License
7 #
8 ############################################################################
9
10 package Apache::Session::DB_File;
11
12 use strict;
13 use vars qw(@ISA $VERSION);
14
15 $VERSION = '1.01';
16 @ISA = qw(Apache::Session);
17
18 use Apache::Session;
19 use Apache::Session::Lock::File;
20 use Apache::Session::Store::DB_File;
21 use Apache::Session::Generate::MD5;
22 use Apache::Session::Serialize::Storable;
23
24 sub populate {
25 my $self = shift;
26
27 $self->{object_store} = Apache::Session::Store::DB_File->new($self);
28 $self->{lock_manager} = Apache::Session::Lock::File->new($self);
29 $self->{generate} = \&Apache::Session::Generate::MD5::generate;
30 $self->{validate} = \&Apache::Session::Generate::MD5::validate;
31 $self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
32 $self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
33
34 return $self;
35 }
36
37 1;
38
39 =pod
40
41 =head1 NAME
42
43 Apache::Session::DB_File - An implementation of Apache::Session
44
45 =head1 SYNOPSIS
46
47 use Apache::Session::DB_File;
48
49 tie %hash, 'Apache::Session::DB_File', $id, {
50 FileName => 'sessions.db',
51 LockDirectory => '/var/lock/sessions',
52 };
53
54 =head1 DESCRIPTION
55
56 This module is an implementation of Apache::Session. It uses the DB_File
57 backing store and the File locking scheme. You must specify the filename of
58 the database file and the directory for locking in arguments to the constructor.
59 See the example, and the documentation for Apache::Session::Store::DB_File and
60 Apache::Session::Lock::File.
61
62 =head1 AUTHOR
63
64 This module was written by Jeffrey William Baker <jwbaker@acm.org>.
65
66 =head1 SEE ALSO
67
68 L<Apache::Session::File>, L<Apache::Session::Flex>,
69 L<Apache::Session::MySQL>, L<Apache::Session::Postgres>, L<Apache::Session>