Egg::Model::Session::Store::UUencode - Encode processing of session data by UUencode.


Egg-Plugin-SessionKit documentation Contained in the Egg-Plugin-SessionKit distribution.

Index


Code Index:

NAME

Top

Egg::Model::Session::Store::UUencode - Encode processing of session data by UUencode.

SYNOPSIS

Top

  package MyApp::Model::Sesion::MySession;

  __PACKAGE__->startup(
   .....
   Store::UUencode
   );

DESCRIPTION

Top

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::UUencode' is added to 'startup'.

  __PACKAGE__->startup(
   Base::DBI
   Store::UUencode
   );

METHODS

Top

store_encode

The result of passing the received session data through 'uuencode' of Convert::UU is returned by the SCALAR reference.

store_decode

The result of passing the received Base64 encode ending data through 'uudecode' of Convert::UU is returned.

SEE ALSO

Top

Egg::Release, Egg::Model::Session::Manager::TieHash, Convert::UU, Storable,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Egg-Plugin-SessionKit documentation Contained in the Egg-Plugin-SessionKit distribution.

package Egg::Model::Session::Store::UUencode;
#
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
#
# $Id: UUencode.pm 256 2008-02-14 21:07:38Z lushe $
#
use strict;
use warnings;
use Storable qw/ nfreeze thaw /;
use Convert::UU qw/ uudecode uuencode /;

our $VERSION= '0.01';

sub store_encode {
	my $self= shift;
	my $data= shift || $self->data;
	\uuencode( nfreeze( $data ) );
}
sub store_decode {
	my $self= shift;
	my $data= shift || die q{I want decode data.};
	thaw( uudecode( $$data ) );
}

1;

__END__