line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Apache::Session::NoSQL; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
74486
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
6
|
use base qw(Apache::Session); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
734
|
|
5
|
1
|
|
|
1
|
|
2619
|
use Apache::Session::Store::NoSQL; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
6
|
1
|
|
|
1
|
|
483
|
use Apache::Session::Generate::MD5; |
|
1
|
|
|
|
|
371
|
|
|
1
|
|
|
|
|
33
|
|
7
|
1
|
|
|
1
|
|
470
|
use Apache::Session::Lock::Null; |
|
1
|
|
|
|
|
177
|
|
|
1
|
|
|
|
|
31
|
|
8
|
1
|
|
|
1
|
|
522
|
use Apache::Session::Serialize::Base64; |
|
1
|
|
|
|
|
5884
|
|
|
1
|
|
|
|
|
35
|
|
9
|
|
|
|
|
|
|
#use Apache::Session::Serialize::Storable; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
7
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
134
|
|
12
|
|
|
|
|
|
|
$VERSION = '0.3'; |
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
|
|
|
|
|
|
|
Note: this module is deprecated, Prefer L<Apache::Session::Browseable> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SYNOPSIS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
use Apache::Session::NoSQL; |
42
|
|
|
|
|
|
|
tie %hash, 'Apache::Session::NoSQL', $id, { |
43
|
|
|
|
|
|
|
Driver => 'Cassandra', |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# or |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Driver => 'Redis', |
48
|
|
|
|
|
|
|
# optional: default to 127.0.0.1:6379 |
49
|
|
|
|
|
|
|
server => '10.1.1.1:6379', |
50
|
|
|
|
|
|
|
}; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This module is an implementation of Apache::Session. It uses a NoSQL database |
55
|
|
|
|
|
|
|
to store datas. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Thomas Chemineau, E<lt>thomas.chemineau@gmail.comE<gt> |
60
|
|
|
|
|
|
|
Xavier Guimard, E<lt>x.guimard@free.frE<gt> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Copyright (C) 2010 by Thomas Chemineau, Xavier Guimard |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
67
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.10.0 or, |
68
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SEE ALSO |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L<Apache::Session> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |