Egg::Model::Session::Manager::Base - Base class for session manager.


  package MyApp::Model::Session::Manager;
  use strict;
  use warnings;
  use base qw/ Egg::Model::Session::Manager::Base /;


Egg::Helper::Model::Sesson It is a base class for the Manager class of the component module that generates to use it.


This module has succeeded to Egg::Base.

startup ([LOAD_MODULES])

LOAD_MODULES is set up and @ISA of receipt TieHash class is set up.

  __PACKAGE__->startup qw/

'Egg::Model::Session' part of the module name given to LOAD_MODULES is omitted and specified. To treat the module name by the full name, '+' is put on the head.

  __PACKAGE__->startup qw/



'MyApp::Model::Session::TieHash' class is done in tie, and the object that does the HASH in the wrapping is returned.

  my $session= $e->model('session_name');

The content of the received object becomes session data. It can access the session by treating the value of the object of this HASH base.

  my $data= $session->{data_key};
  $session->{in_data}= 'hoge';


The object of the TieHash class is returned.

However, even if the method of the TieHash class is used with the object of this class, the same result is obtained because this class is relaying Egg::Model::Session::Manager::TieHash by AUTOLOAD.

  my $id= $session->context->session_id;
  my $id= $session->session_id;


All opened sessions are shut.

In a word, if the two or more sessions have been opened at the same time when two or more component modules have been treated, the all are shut.

  # The close method is used to shut individually.

However, because this method is executed with '_finish' hook, it is not necessary to usually consider it on the application side.


Egg::Release, Egg::Model::Session, Egg::Model::Session::Manager::TieHash, Egg::Helper::Model::Session, Egg::Base, Class::C3,


Masatoshi Mizuno <>


Copyright (C) 2008 Bee Flag, Corp. <>, 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.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 113:

Non-ASCII character seen before =encoding in '¥³¥ó¥¹¥È¥é¥¯¥¿¡£'. Assuming CP1252