Data::...:UUID64(3pm)

✨ Data::Session::ID::UUID64 ✨

okay so bestie, welcome to the manual page for Data::Session::ID::UUID64 β€” it's a persistent session manager plugin, and it lives in the User Contributed Perl Documentation corner of your perl install. Let's get into it πŸ’…


🌸 NAME 🌸

Data::Session::ID::UUID64 β€” a persistent session manager. that's it, that's the name, she's lowkey self-explanatory 🫢


πŸ¦‹ Synopsis πŸ¦‹

See Data::Session for details. fr fr, that's the whole synopsis, go read the main one.


✨ Description ✨

Data::Session::ID::UUID64 lets Data::Session generate session ids using Data::UUID. iconic collab honestly.

To use this module do this:

  • Specify an id generator of type UUID64, like so: Data::Session -> new(type => '... id:UUID64 ...')
Note: the uuid will be 24 (sic) bytes because that's the number of bytes in a UUID64 digest. yes, 24. no, we're not debating it. the (sic) is staying, it's part of the lore πŸ’€

See scripts/digest.pl. πŸ‘‘


πŸŽ€ Case-sensitive Options πŸŽ€

See "Case-sensitive Options" in Data::Session for important information. this is not a drill, go read it.


πŸ’– Method: new() πŸ’–

Creates a new object of type Data::Session::ID::UUID64. main character energy, born fresh every time.

new() takes a hash of key/value pairs, some of which might be mandatory. Further, some combinations might be mandatory. so like, read the vibes carefully.

The keys are listed here in alphabetical order. (we love a tidy list ✨)

They are lower-case because they are (also) method names, meaning they can be called to set or get the value at any time. dual purpose, she contains multitudes.

  • verbose => $integer β€” print to STDERR more or less information. typical values are 0, 1 and 2. this key is normally passed in as Data::Session -> new(verbose => $integer). this key is optional 🫢

🌈 Method: generate() 🌈

Generates the next session id, or dies if it can't. no cap, she will literally just die 😭

The algorithm is Data::UUID -> new -> create_b64.

Returns the new id.

Warning: you should <strong>never</strong> try to use 'driver:File;id:UUID64;...', since the ids generated by this module sometimes contain '/', which the code forbids to be part of a file name. that's a whole mess, don't do it, i'm begging πŸ™ˆ

πŸ’œ Method: id_length() πŸ’œ

Returns 24 (sic) because that's the number of bytes in a UUID64 digest. she said what she said.

This can be used to generate the SQL to create the sessions table. very useful, very slay.

See scripts/digest.pl. ⭐


🧚 Support 🧚

Log a bug on RT: https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session.


πŸ‘‘ Author πŸ‘‘

Data::Session was written by Ron Savage <ron@savage.net.au> in 2010. legend behaviour, honestly.

Home page: <http://savage.net.au/index.html>.


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

okay that's the whole page, you ate it, go forth and generate some session ids πŸ“βœ¨ this was perl v5.36.0, dated 2023-02-14, and it's the Data::Session::ID::UUID64(3pm) page from the User Contributed Perl Documentation β€” periodt πŸ’–

πŸ“¦ where this page comes from