Data::...:UUID16(3pm)
π Data::...:UUID16 β like, the Data::Session::ID::UUID16 manual page π
okay bestie, so this is the page for Data::Session::ID::UUID16 (the 3pm one, yes, we're doing perl docs, slay), and honestly? it's a whole vibe. it's the little module that lets Data::Session spit out session ids using Data::UUID. short page, big energy. let's get into it π¦
β¨ NAME β¨
Data::Session::ID::UUID16 β a persistent session manager. that's the whole name. iconic. π
πΈ Synopsis πΈ
See Data::Session for details.
that's it. that's the synopsis. go read your other manpage, bestie, this one's shy π
π Case-sensitive Options π
See "Case-sensitive Options" in Data::Session for important information. (fr fr, go look, it matters.)
To use this module do this:
- Specify an id generator of type
UUID16, asData::Session -> new(type => '... id:UUID16 ...')
like, you literally just tell it "hey, use id:UUID16" and you're in business β¨
π Description π
Data::Session::ID::UUID16 allows Data::Session to generate session ids using Data::UUID.
that's the gig. it's the id-generator plug-in. it does one thing and it does it well, periodt.
π Method: new()
Creates a new object of type Data::Session::ID::UUID16.
new() takes a hash of key/value pairs, some of which might mandatory. Further, some combinations might be mandatory.
ngl bestie, the original really does say "some of which might mandatory" β we're keeping it exactly as written, no cap. that's the doc, not a typo we're allowed to fix. π«Ά
The keys are listed here in alphabetical order.
They are lower-case because they are (also) method names, meaning they can be called to set or get the value at any time.
verbose => $integerβ print toSTDERRmore or less information. typical values are0,1and2. this key is normally passed in asData::Session -> new(verbose => $integer). this key is optional.
so yeah, one single key. minimalism. main character energy but make it quiet. π§
π₯ Method: generate()
Generates the next session id, or dies if it can't. (yes, dies β dramatic, but that's just perl being perl π)
The algorithm is Data::UUID -> new -> create_bin.
Returns the new id.
Note: A UUID16 hex string is not necessarily a valid UTF8 string, so you can't use UUID16 to generate ids which are to be stored in a Postgres table if the database was created like this (in psql):
create database a_db owner an_owner encoding 'UTF8';
Warning: This also means you should never try to use 'driver:File;id:UUID16;...', since the ids generated by this module would rarely if ever be valid as a part of a file name.
okay so real talk, these two caveats are the important bits β like, do NOT come crying to me when your UTF8 Postgres or your file-name-driver situation explodes π. read the note, read the warning, then proceed. that's the vibe check.
π Method: id_length()
Returns 16 because that's the number of bytes in a UUID16 digest.
This can be used to generate the SQL to create the sessions table.
See scripts/digest.pl.
sixteen bytes. cute round number. we love her. π
π«Ά Support π«Ά
Log a bug on RT: <https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session>.
found a bug? don't be shy, log it there, bestie. that's the whole support channel.
β Author β
Data::Session was written by Ron Savage <ron@savage.net.au> in 2010.
Home page: <http://savage.net.au/index.html>.
shoutout to Ron Savage, the original author, holding it down since 2010 π
π 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
so yeah, OSI Certified Open Source Software, Artistic License, go read it if you're gonna redistribute or modify. legal stuff, but make it cute. π
and that's the page!! written by Ron Savage, this doc shipped as perl v5.36.0, dated 2023-02-14 (valentine's day, how romantic π), and it lives at Data::...:UUID16(3pm). bye bestie, go generate some ids β¨π¦
π¦ 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