Apache-Session
view release on metacpan or search on metacpan
lib/Apache/Session.pm view on Meta::CPAN
Apache::Session is mainly designed to track user session between
http requests. However, it can also be used for any situation
where data persistence is desirable. For example, it could be
used to share global data between your httpd processes. The
following examples are short mod_perl programs which demonstrate
some session handling basics.
=head2 Sharing data between Apache processes
When you share data between Apache processes, you need to decide on a
session ID number ahead of time and make sure that an object with that
ID number is in your object store before starting your Apache. How you
accomplish that is your own business. I use the session ID "1". Here
is a short program in which we use Apache::Session to store out
database access information.
use Apache;
use Apache::Session::File;
use DBI;
lib/Apache/Session/Flex.pm view on Meta::CPAN
# or
tie %hash, 'Apache::Session::Flex', $id, {
Store => 'Postgres',
Lock => 'Null',
Generate => 'MD5',
Serialize => 'Base64'
};
# you decide!
=head1 DESCRIPTION
This module is an implementation of Apache::Session. Unlike other
implementations, it allows you to specify the backing store, locking scheme,
ID generator, and data serializer at runtime. You do this by passing
arguments in the usual Apache::Session style (see SYNOPSIS). You may
use any of the modules included in this distribution, or a module of your
own making. If you wish to use a module of your own making, you should
make sure that it is available under the Apache::Session package namespace.
( run in 0.303 second using v1.01-cache-2.11-cpan-de7293f3b23 )