-
-
14 Mar 2022 02:18:12 UTC
- Distribution: Dancer2
- Module version: 0.400000
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (1526 / 4 / 9)
- Kwalitee
Bus factor: 3- 84.77% Coverage
- License: perl_5
- Perl: v5.12.5
- Activity
24 month- Tools
- Download (393.07KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Dancer Core Developers
- Dependencies
- Attribute::Handlers
- CLI::Osprey
- Carp
- Clone
- Config::Any
- Digest::SHA
- Encode
- Exporter
- Exporter::Tiny
- File::Basename
- File::Copy
- File::Path
- File::Share
- File::Spec
- File::Temp
- File::Which
- HTTP::Date
- HTTP::Headers::Fast
- HTTP::Tiny
- Hash::Merge::Simple
- Hash::MultiValue
- Import::Into
- JSON::MaybeXS
- List::Util
- MIME::Base64
- Module::Runtime
- Moo
- Moo::Role
- POSIX
- Path::Tiny
- Plack
- Plack::Middleware::FixMissingBodyInRedirect
- Plack::Middleware::RemoveRedundantBody
- Ref::Util
- Role::Tiny
- Safe::Isa
- Sub::Quote
- Template
- Template::Tiny
- Test::Builder
- Test::More
- Type::Tiny
- Types::Standard
- URI::Escape
- YAML
- parent
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Dancer2::Core::Role::SessionFactory::File - Role for file-based session factories
VERSION
version 0.400000
DESCRIPTION
This is a specialized SessionFactory role for storing session data in files.
This role manages the files. Classes consuming it only need to handle serialization and deserialization.
Classes consuming this must satisfy three requirements:
_suffix
,_freeze_to_handle
and_thaw_from_handle
.package Dancer2::Session::XYX; use Dancer2::Core::Types; use Moo; has _suffix => ( is => 'ro', isa => Str, default => sub { '.xyz' }, ); with 'Dancer2::Core::Role::SessionFactory::File'; sub _freeze_to_handle { my ($self, $fh, $data) = @_; # ... do whatever to get data into $fh return; } sub _thaw_from_handle { my ($self, $fh) = @_; my $data; # ... do whatever to get data from $fh return $data; } 1;
ATTRIBUTES
session_dir
Where to store the session files. Defaults to "./sessions".
AUTHOR
Dancer Core Developers
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 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.
Module Install Instructions
To install Dancer2, copy and paste the appropriate command in to your terminal.
cpanm Dancer2
perl -MCPAN -e shell install Dancer2
For more information on module installation, please visit the detailed CPAN module installation guide.