line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Session::Hidden; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1067
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
4
|
1
|
|
|
1
|
|
1063
|
use MIME::Base64 qw(); |
|
1
|
|
|
|
|
1088
|
|
|
1
|
|
|
|
|
458
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub store { |
9
|
0
|
|
|
0
|
0
|
|
my( $self, $sid, $options, $data ) = @_; |
10
|
0
|
|
|
|
|
|
my $storable_data = $self->freeze( $data ); |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
$self->{_data} = $storable_data; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
return 1; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub retrieve { |
18
|
0
|
|
|
0
|
0
|
|
my( $self, $sid, $options ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
0
|
|
|
|
my $data = $self->thaw( MIME::Base64::decode_base64 |
21
|
|
|
|
|
|
|
( $options->[1]{CGI}->param( $sid ) || '' ) ); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $data; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# these two do not require an implementation |
27
|
0
|
|
|
0
|
0
|
|
sub remove { |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
0
|
|
sub teardown { |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub field { |
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
0
|
0
|
|
|
|
|
$self->flush unless $self->_data; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $val = MIME::Base64::encode_base64( $self->_data ); |
39
|
0
|
|
|
|
|
|
return ( 'type="hidden" name="' . |
40
|
|
|
|
|
|
|
$self->id . '" value="' . $val . '"' ); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
|
|
sub _data { $_[0]->{_data} } |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |