File Coverage

blib/lib/Apache/Session/NoSQL.pm
Criterion Covered Total %
statement 21 29 72.4
branch n/a
condition n/a
subroutine 7 8 87.5
pod 0 1 0.0
total 28 38 73.6


line stmt bran cond sub pod time code
1             package Apache::Session::NoSQL;
2              
3 1     1   15546 use strict;
  1         2  
  1         30  
4 1     1   3 use base qw(Apache::Session);
  1         2  
  1         593  
5 1     1   1895 use Apache::Session::Store::NoSQL;
  1         2  
  1         39  
6 1     1   51875 use Apache::Session::Generate::MD5;
  1         395  
  1         42  
7 1     1   67329 use Apache::Session::Lock::Null;
  1         268  
  1         45  
8 1     1   57760 use Apache::Session::Serialize::Base64;
  1         62450  
  1         49  
9             #use Apache::Session::Serialize::Storable;
10              
11 1     1   11 use vars qw($VERSION);
  1         2  
  1         176  
12             $VERSION = '0.2';
13              
14             sub populate {
15 0     0 0   my $self = shift;
16              
17 0           $self->{object_store} = new Apache::Session::Store::NoSQL $self;
18 0           $self->{lock_manager} = new Apache::Session::Lock::Null $self;
19 0           $self->{generate} = \&Apache::Session::Generate::MD5::generate;
20 0           $self->{validate} = \&Apache::Session::Generate::MD5::validate;
21 0           $self->{serialize} = \&Apache::Session::Serialize::Base64::serialize;
22 0           $self->{unserialize} = \&Apache::Session::Serialize::Base64::unserialize;
23             #$self->{serialize} = \&Apache::Session::Serialize::Storable::serialize;
24             #$self->{unserialize} = \&Apache::Session::Serialize::Storable::unserialize;
25              
26 0           return $self;
27             }
28              
29             1;
30              
31             __END__
32              
33             =head1 NAME
34              
35             Apache::Session::NoSQL - An implementation of Apache::Session module for NoSQL databases
36              
37             =head1 SYNOPSIS
38              
39             use Apache::Session::NoSQL;
40             tie %hash, 'Apache::Session::NoSQL', $id, {
41             Driver => 'Cassandra',
42            
43             # or
44            
45             Driver => 'Redis',
46             # optional: default to 127.0.0.1:6379
47             server => '10.1.1.1:6379',
48             };
49              
50             =head1 DESCRIPTION
51              
52             This module is an implementation of Apache::Session. It uses a NoSQL database
53             to store datas.
54              
55             =head1 AUTHOR
56              
57             Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt>
58             Xavier Guimard, E<lt>x.guimard@free.frE<gt>
59              
60             =head1 COPYRIGHT AND LICENSE
61              
62             Copyright (C) 2010 by Thomas Chemineau, Xavier Guimard
63              
64             This library is free software; you can redistribute it and/or modify
65             it under the same terms as Perl itself, either Perl version 5.10.0 or,
66             at your option, any later version of Perl 5 you may have available.
67              
68             =head1 SEE ALSO
69              
70             L<Apache::Session>
71              
72             =cut