Data::...:Oracle(3pm)
πΈ NAME πΈ
Data::Session::Driver::Oracle β it's a persistent session manager, bestie. That's the whole vibe. π
β¨ SYNOPSIS β¨
Ok so like, the actual usage lives somewhere else, go look there:
See Data::Session for details.
π¦ DESCRIPTION π¦
So Data::Session::Driver::Oracle is the plug that lets Data::Session stash your sessions through DBD::Oracle. That's it, that's the job. π
To actually use this module you gotta do both of these, no skipping:
- Specify a driver of type Oracle, like
Data::Session -> new(type => 'driver:Oracle ...') - Specify a database handle as
Data::Session -> new(dbh => $dbh)or a data source asData::Session -> new(data_source => $string)
π CASE-SENSITIVE OPTIONS π
Yeah so this is a whole thing, go read "Case-sensitive Options" in Data::Session for the important info. Not me being dramatic, it's literally important. π
π METHOD: new() π
Makes you a brand new object of type Data::Session::Driver::Oracle. Fresh out the box. β¨
new() takes a hash of key/value pairs, and ngl some of them might be mandatory. Also some combinations might be mandatory. It's giving picky, but respectfully.
The keys are listed here in alphabetical order. π
They're lower-case because they're also method names, meaning you can call them to set or get the value at literally any time. iykyk.
data_col_name=>$stringβ Specifies the name of the column in the sessions table which holds the session data.- This key is normally passed in as
Data::Session -> new(data_col_name => $string). - Default:
'a_session'. - This key is optional. π
- This key is normally passed in as
data_source=>$stringβ Specifies the data source (as used byDBI -> connect($data_source, $username, $password, $attr)) to obtain a database handle.- This key is normally passed in as
Data::Session -> new(data_source => $string). - Default:
''. - This key is optional, as long as a value is supplied for
'dbh'.
- This key is normally passed in as
data_source_attr=>$stringβ Specifies the attributes (as used byDBI -> connect($data_source, $username, $password, $data_source_attr)) to obtain a database handle.- This key is normally passed in as
Data::Session -> new(data_source_attr => $string). - Default:
{AutoCommit => 1, PrintError => 0, RaiseError => 1}. - This key is optional.
- This key is normally passed in as
dbh=>$dbhβ Specifies the database handle to use to access the sessions table.- This key is normally passed in as
Data::Session -> new(dbh => $dbh). - If not specified, this module will use the values of these keys to obtain a database handle:
data_sourcedata_source_attrusernamepassword
- Default:
''. - This key is optional.
- This key is normally passed in as
host=>$stringβ Not used. π« (yeah, it just sits there, minding its own business)id_col_name=>$stringβ Specifies the name of the column in the sessions table which holds the session id.- This key is normally passed in as
Data::Session -> new(id_col_name => $string). - Default:
'id'. - This key is optional.
- This key is normally passed in as
password=>$stringβ Specifies the password (as used byDBI -> connect($data_source, $username, $password, $data_source_attr)) to obtain a database handle.- This key is normally passed in as
Data::Session -> new(password => $string). - Default:
''. - This key is optional.
- This key is normally passed in as
port=>$stringβ Not used. π«socket=>$stringβ Not used. π«table_name=>$stringβ Specifies the name of the sessions table.- This key is normally passed in as
Data::Session -> new(table_name => $string). - Default:
'sessions'. - This key is optional.
- This key is normally passed in as
username=>$stringβ Specifies the username (as used byDBI -> connect($data_source, $username, $password, $data_source_attr)) to obtain a database handle.- This key is normally passed in as
Data::Session -> new(username => $string). - Default:
''. - This key is optional.
- This key is normally passed in as
verbose=>$integerβ Print toSTDERRmore or less information. Typical values are0,1and2.- This key is normally passed in as
Data::Session -> new(verbose => $integer). - This key is optional.
- This key is normally passed in as
π METHOD: remove($id) π
Deletes from storage the session identified by $id, or dies if it can't. No in-between, bestie. π
Returns 1. Periodt.
π₯ METHOD: retrieve($id) π₯
Retrieves from storage the session identified by $id, or dies if it can't.
Returns the session.
Heads up: this is a frozen session. This value must be thawed by calling the appropriate serialization driver'sthaw()method. But don't stress βData::Sessioncalls the rightthaw()automatically. π§
π METHOD: store($id => $data) π
Writes to storage the session identified by $id, together with its data $data, or dies if it can't.
Returns 1. Slay.
β METHOD: traverse() β
Retrieves all ids from the sessions table, and for each id calls the supplied subroutine with the id as the only parameter.
$dbh -> selectall_arrayref is used, and the table is not locked. Lowkey important, remember that. ππ«
Returns 1.
π«Ά SUPPORT π«Ά
Log a bug on RT:
<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session>
They'll help you out, fr fr. π
π AUTHOR π
Data::Session was written by Ron Savage <ron@savage.net.au> in 2010.
Home page: <http://savage.net.au/index.html>.
π COPYRIGHT π
Australian copyright (c) 2010, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software';
you can redistribute them and/or modify them under the terms of
The Artistic License, a copy of which is available at:
http://www.opensource.org/licenses/index.html
And that's the whole page, bestie β¨ this one's Data::...:Oracle(3pm) from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2023-02-14 β love that for us, mwah π
π
π¦ where this page comes from
- debian trixie: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdata-session-perl 1.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-session-perl 1.18-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