| Egg-Plugin-SessionKit documentation | Contained in the Egg-Plugin-SessionKit distribution. |
Egg::Model::Session::ID::UniqueID - 'mod_uniqueid' is used for session ID.
package MyApp::Model::Sesion::MySession; __PACKAGE__->startup( ..... ID::UniqueID );
Enhancing module 'mod_uniqueid' of Apache is used for session ID.
The WEB server should set up to use it and Apache and mod_uniqueid have set it up.
The value of environment variable 'UNIQUE_ID' is returned.
The result of the format check of session ID is returned.
Egg::Release, Egg::Model::Session::Manager::TieHash, http://www.apache.org/, http://httpd.apache.org/docs/2.0/ja/mod/mod_unique_id.html,
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::ID::UniqueID; # # Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> # # $Id: UniqueID.pm 256 2008-02-14 21:07:38Z lushe $ # use strict; use warnings; use Carp qw/ croak /; our $VERSION= '0.01'; sub make_session_id { $ENV{UNIQUE_ID} || die q{ $ENV{UNIQUE_ID} variable cannot be acquired. }; } sub valid_session_id { my $self= shift; my $id= shift || croak q{I want session id.}; $id=~m{^[A-Za-z0-9\@\-]{19}$} ? $id : (undef); } 1; __END__