Apache::WeSQL::Session - Session subs for a journalled WeSQL application
use Apache::WeSQL::Session qw( :all );
This module contains the code for session and session data support in WeSQL.
This module is called from AppHandler.pm, and Journalled.pm
This module also contains some code for storing and retrieving data in a user session. This code is used by the jForm, jDetails and jList code in the Apache::WeSQL::Display module. It needs a table called 'sessiondata' in your database, which is defined as follows (MySQL definition): (for the PostgreSQL definition see the sample Addressbook application)
create table sessiondata ( pkey bigint(20) unsigned not null auto_increment, id bigint(20) unsigned not null, uid bigint(20) unsigned not null, suid bigint(20) unsigned not NULL default '0', epoch bigint unsigned not null, status tinyint default '1' NOT NULL, sessionid bigint(20) unsigned not null, name varchar(50) default '' not null, value text default '' not null, primary key (pkey) );
Of course, they will also require the table sessions (MySQL definition, see Addressbook application for PostgreSQL):
create table sessions ( pkey bigint(20) unsigned not null auto_increment, id bigint(20) unsigned not null, uid bigint(20) unsigned not null, suid bigint(20) unsigned not NULL default '0', epoch bigint unsigned not null, status tinyint default '1' NOT NULL, hash varchar(16) default '' not null, primary key (pkey) );
The subs for reading/writing/deleting session data are: sWrite sDelete sRead sReadAll sReadAllLike sOverWrite sDeleteValue sDeleteAll sDeleteAllLike. You can use these in EVAL blocks in wesql files, but you'll have to refer to them using the full path, e.g. like this: &Apache::WeSQL::Session::sOverWrite
The sessions work by storing a cookie with a unique value on the user's computer. This means that without cookie support, session support will not be available.
For more information, have a look at the source code of the Apache::WeSQL::Session module.
This module is part of the WeSQL package, version 0.53
(c) 2000-2002 by Ward Vandewege
None by default. Possible: session sWrite sDelete sRead sReadAll sReadAllLike sOverWrite sDeleteValue sDeleteAll sDeleteAllLike
Ward Vandewege, <ward@pong.be>
Apache::WeSQL, Apache::WeSQL::AppHandler, Apache::WeSQL::Journalled, Apache::WeSQL::Display
To install Apache::WeSQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::WeSQL
CPAN shell
perl -MCPAN -e shell install Apache::WeSQL
For more information on module installation, please visit the detailed CPAN module installation guide.