line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Session::Driver::hidden; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2033
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
4
|
1
|
|
|
1
|
|
7
|
use base qw(CGI::Session::Driver CGI::Session::ErrorHandler); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1149
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1982
|
use MIME::Base64 qw(); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
330
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub store { |
11
|
0
|
|
|
0
|
1
|
|
my( $self, $sid, $datastr ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
$self->{_data} = $datastr; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub retrieve { |
17
|
0
|
|
|
0
|
1
|
|
my( $self, $sid ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
0
|
|
|
|
return MIME::Base64::decode_base64( $self->_cgi->param( $sid ) || '' ); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub remove { |
23
|
0
|
|
|
0
|
1
|
|
my( $self, $sid ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return 1; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub traverse { |
29
|
0
|
|
|
0
|
1
|
|
my( $self, $coderef ) = @_; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# not meaningful... |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub field { |
35
|
0
|
|
|
0
|
1
|
|
my( $self, $session ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
$session->flush; |
38
|
|
|
|
|
|
|
# die 'Call $session->flush() first' unless $self->_data; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $val = MIME::Base64::encode_base64( $self->_data ); |
41
|
0
|
|
|
|
|
|
return ( 'type="hidden" name="' . |
42
|
|
|
|
|
|
|
$session->id . '" value="' . $val . '"' ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
|
|
sub _data { $_[0]->{_data} } |
46
|
0
|
|
|
0
|
|
|
sub _cgi { $_[0]->{CGI} } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# EVIL |
49
|
|
|
|
|
|
|
sub CGI::Session::field { |
50
|
0
|
|
|
0
|
0
|
|
my( $self ) = @_; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $self->_driver->field( $self ); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |