Apache...Oracle(3pm)
π Apache::Session::Store::Oracle β the vibe
ok so bestie, real talk: this is a page from the User Contributed Perl Documentation manual, and it's about Apache::Session::Store::Oracle(3pm). Yes that name has three dots in it, no I will not be explaining why, we move. π
β¨ NAME β¨
Apache::Session::Store::Oracle β the module that keeps your persistent data safe and sound in a Oracle database. she's a storage girlie and she's slaying it π
πΈ SYNOPSIS πΈ
here's the whole thing, exactly as it lives:
use Apache::Session::Store::Oracle;
my $store = new Apache::Session::Store::Oracle;
$store->insert($ref);
$store->update($ref);
$store->materialize($ref);
$store->remove($ref);
four little methods, four little jobs, no notes. β¨
π DESCRIPTION π
So. Apache::Session::Store::Oracle fulfills the storage interface of Apache::Session. That's the whole thing. It's the plug that makes Apache::Session go, and the place it stores all your session data is β you guessed it β a Oracle database. iconic behavior honestly π
π SCHEMA π
okay so before any of this works you need a table. and bestie, that table has to be called sessions, and it needs at least these columns:
id varchar2(32) # or however long your session IDs are.
a_session long
and yeah β that # or however long your session IDs are. is literally in there, it's giving "we trust you to know your own session IDs" and honestly? valid π«Ά
if you wanna build this schema with the sqlplus program, run exactly this:
CREATE TABLE sessions (
id varchar2(32) not null primary key,
a_session long
);
π¨ but listen β if you use some other command instead, you gotta ensure that there is a unique index on the table's id column. no unique index, no slay. periodt.
π¦ CONFIGURATION π¦
The module must know what datasource, username, and password to use when connecting to the database. These values can be set using the options hash (go read the Apache::Session documentation, she explains it). The options are DataSource, UserName, and Password.
Example, verbatim, look at her:
tie %hash, 'Apache::Session::Oracle', $id, {
DataSource => 'dbi:Oracle:database',
UserName => 'database_user',
Password => 'K00l'
};
the password is K00l and that is canon, don't touch it π
Instead of all that, you may pass in an already-opened DBI handle to your database. Like so:
tie %hash, 'Apache::Session::Oracle', $id, {
Handle => $dbh
};
easy. convenient. no cap. β¨
The last option is LongReadLen, which specifies the maximum size of the session object. If you don't supply it, the default maximum size is 8 KB. small but mighty I guess π
π AUTHOR π
This modules was written by Jeffrey William Baker <jwbaker@acm.org> β yes, "modules", we're keeping the typo, it's part of the lore π
A fix for the commit policy was contributed by Michael Schout <mschout@gkg.net> β ty king π«Ά
β SEE ALSO β
Apache::SessionApache::Session::Store::DBI
go read them, they're the supporting cast and they ate π₯
okay that's the whole page bestie, every flag, every column, every option, all of it. you're so ready for this. go store some sessions π β¨
and for the sign-off: this was perl v5.36.0, dated 2022-11-19, from the User Contributed Perl Documentation section. mwah. π
π¦ where this page comes from
- debian bookworm: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms