| 1 | package CGI::Session::Driver::hidden; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use base qw(CGI::Session::Driver CGI::Session::ErrorHandler); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use MIME::Base64 qw(); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 1 | our $VERSION = '0.03'; | |||||||||||
| 9 | |||||||||||||
| 10 | 0 | ▶ | sub store { | ||||||||||
|
Subroutine
store: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 11 | 0 | my( $self, $sid, $datastr ) = @_; | |||||||||||
| 12 | |||||||||||||
| 13 | 0 | $self->{_data} = $datastr; | |||||||||||
| 14 | } | ||||||||||||
| 15 | |||||||||||||
| 16 | 0 | ▶ | sub retrieve { | ||||||||||
|
Subroutine
retrieve: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 17 | 0 | my( $self, $sid ) = @_; | |||||||||||
| 18 | |||||||||||||
| 19 | 0 | ▶ | return MIME::Base64::decode_base64( $self->_cgi->param( $sid ) || '' ); | ||||||||||
|
Condition0%0/2
$self->_cgi->param($sid) || ''
MC/DC0%0/1
$self->_cgi->param($sid) || ''
$self->_cgi->param($sid)
Truth table0%0/2
A
A= $self->_cgi->param($sid)
| |||||||||||||
| 20 | } | ||||||||||||
| 21 | |||||||||||||
| 22 | 0 | ▶ | sub remove { | ||||||||||
|
Subroutine
remove: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 23 | 0 | my( $self, $sid ) = @_; | |||||||||||
| 24 | |||||||||||||
| 25 | 0 | return 1; | |||||||||||
| 26 | } | ||||||||||||
| 27 | |||||||||||||
| 28 | 0 | ▶ | sub traverse { | ||||||||||
|
Subroutine
traverse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 29 | 0 | my( $self, $coderef ) = @_; | |||||||||||
| 30 | |||||||||||||
| 31 | # not meaningful... | ||||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 0 | ▶ | sub field { | ||||||||||
|
Subroutine
field: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 35 | 0 | 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 | ▶ | sub _data { $_[0]->{_data} } | ||||||||||
|
Subroutine
_data: not called CC=1 SCAR=6.9
| |||||||||||||
| 46 | 0 | ▶ | sub _cgi { $_[0]->{CGI} } | ||||||||||
|
Subroutine
_cgi: not called CC=1 SCAR=6.9
| |||||||||||||
| 47 | |||||||||||||
| 48 | # EVIL | ||||||||||||
| 49 | 0 | ▶ | sub CGI::Session::field { | ||||||||||
|
Subroutine
field: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 50 | 0 | my( $self ) = @_; | |||||||||||
| 51 | |||||||||||||
| 52 | 0 | return $self->_driver->field( $self ); | |||||||||||
| 53 | } | ||||||||||||
| 54 | |||||||||||||
| 55 | 1 | 1; | |||||||||||
| 56 | |||||||||||||
| 57 | __END__ | ||||||||||||