| Egg-Plugin-SessionKit documentation | Contained in the Egg-Plugin-SessionKit distribution. |
Egg::Model::Session::Store::Base64 - Encode processing of session data by Base64.
package MyApp::Model::Sesion::MySession; __PACKAGE__->startup( ..... Store::Base64 );
It is a component to use it together with Base system component that cannot preserve the session data as it is.
To use it, 'Store::Base64' is added to 'startup'.
__PACKAGE__->startup( Base::DBI Store::Base64 );
The result of passing the received session data through 'encode_base64' of MIME::Base64 is returned by the SCALAR reference.
The result of passing the received Base64 encode ending data through 'decode_base64' of MIME::Base64 is returned.
Masatoshi Mizuno <lushe&64;cpan.org>
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
| Egg-Plugin-SessionKit documentation | Contained in the Egg-Plugin-SessionKit distribution. |
package Egg::Model::Session::Store::Base64; # # Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> # # $Id: Base64.pm 256 2008-02-14 21:07:38Z lushe $ # use strict; use warnings; use Storable qw/ nfreeze thaw /; use MIME::Base64; our $VERSION= '0.01'; sub store_encode { my $self= shift; my $data= shift || $self->data; \encode_base64( nfreeze( $data ) ); } sub store_decode { my $self= shift; my $data= shift || die q{I want decode data.}; thaw( decode_base64( $$data ) ); } 1; __END__