Apache...:MySQL(3pm)

πŸ’– Apache::Session::MySQL πŸ’–

okay bestie, so this page lives in the User Contributed Perl Documentation section of your manual, and it's all about Apache::Session::MySQL β€” an implementation of Apache::Session. yes, the name is giving "module that did not get a catchy nickname," we move anyway. ✨


πŸŽ€ NAME πŸŽ€

Apache::Session::MySQL β€” an implementation of Apache::Session

like. that's it. that's the whole name section. it's honest, it's direct, it's lowkey iconic for saying exactly one thing and dipping. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the vibe, copy-paste ready, no notes:

use Apache::Session::MySQL;

#if you want Apache::Session to open new DB handles:

tie %hash, 'Apache::Session::MySQL', $id, {
   DataSource => 'dbi:mysql:sessions',
   UserName   => $db_user,
   Password   => $db_pass,
   LockDataSource => 'dbi:mysql:sessions',
   LockUserName   => $db_user,
   LockPassword   => $db_pass
};

#or, if your handles are already opened:

tie %hash, 'Apache::Session::MySQL', $id, {
   Handle     => $dbh,
   LockHandle => $dbh
};

so basically: two paths, pick your fighter. πŸ₯Š either you let Apache::Session open brand new DB handles for you (that's the first block, with DataSource, UserName, Password, LockDataSource, LockUserName and LockPassword all doing their little jobs), or your handles are already opened and you just hand over Handle and LockHandle. no cap, that's the whole fork in the road.


🌸 DESCRIPTION 🌸

this module is an implementation of Apache::Session. periodt. πŸ’…

it uses the MySQL backing store and the MySQL locking scheme β€” so storage and locking, both MySQL flavored, matching set, adorable.

want the full tea? go read the example, plus the documentation for Apache::Session::Store::MySQL and Apache::Session::Lock::MySQL for more details. they're the ones holding the actual lore, fr fr. πŸ“š


πŸ‘‘ AUTHOR πŸ‘‘

this module was written by Jeffrey William Baker <jwbaker@acm.org>. king behavior, we stan a credited author. 🫢


🌈 SEE ALSO 🌈

go read these too, bestie, they're the extended universe:

  • Apache::Session::File
  • Apache::Session::Flex
  • Apache::Session::DB_File
  • Apache::Session::Postgres
  • Apache::Session

heads up: this page is perl v5.36.0 coded and dated 2022-11-19, so if something looks vintage, that's because it is. still slaying though. πŸ’œ

mwah, go tie some hashes, you've got this. πŸ§šπŸ’–

πŸ“¦ where this page comes from