Dancer2...n::YAML(3)
π NAME π
Dancer2::Session::YAML β it's giving YAML-file-based session backend for Dancer2 β¨ (and yes bestie, that's the whole name, she's long but she's worth it)
Oh also? This page lives in the User Contributed Perl Documentation section, manual section 3, so likeβ¦ third-party module docs, iykyk π
πΈ VERSION πΈ
version 2.2.1 β that's the one, no cap π
β¨ DESCRIPTION β¨
Okay so bestie, listen. This module is a session engine that runs on YAML files. Your sessions get stored in a session_dir as YAML files, one per session, sitting there like little readable text babies π₯Ί
The whole idea behind this module? Human-readable session storage for the developer. That's it, that's the vibe. You wanna peek inside a session and actually read it like a person instead of decoding binary goop? That's the dream this module is serving. π
This backend is intended to be used in development environments, specifically for when digging inside a session is useful. Which is, like, all the time when you're debugging, fr fr π
Now, can it be used in production? Yes, absolutely, this backend can perfectly be used in production environments β but bestie, keep TWO things in mind and don't skip this part: 1. The content of the session files is in plain text. Like, plain. Text. Anyone with file access can read it. π 2. The session files should be purged by a CRON job. They do not clean themselves up, they are not self-maintaining, they will pile up like unread notifications. Set up that CRON, bestie. π
π CONFIGURATION π
First things first: you gotta set the setting session to "YAML" so your Dancer2 app knows to use this engine. That's the entry fee, no exceptions. πΈ
Then, the files get stored to whatever you put in the setting session_dir. Its default value is:
appdir/sessions
Here's an example configuration that uses this session engine and stores session files in /tmp/dancer-sessions β copy it, love it, make it yours π«Ά
session: "YAML"
engines:
session:
YAML:
session_dir: "/tmp/dancer-sessions"
cookie_duration: 3600 # Default cookie timeout in seconds
Look at that. Beautiful. Organized. Iconic. β¨
π¦ DEPENDENCY π¦
This module depends on YAML. That's it. Just YAML. Make sure it's installed or nothing's gonna work and we'll both be sad π
π SEE ALSO π
Wanna know the details about session usage in route handlers? Go read Dancer2::Core::Session β she's the one with the lore, bestie π
π AUTHOR π
Dancer Core Developers β legends, honestly, we stan π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Alexis Sukrieh.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πͺ
and that's the whole page, bestie!! this was documented with perl v5.42.3 on 2026-09-20 β mwah, go write some readable sessions, slay, periodt π
β¨π¦
π¦ where this page comes from
- fedora 44: perl-Dancer2 2.2.1-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms