Plugin/SessionStorage.pm

filter: Statementstmt 33.3% 1 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 50.0% 2 / 4 CC 1 SCAR 2.6
CC
1
Cov
33%
BEGIN
1.3
CRAP 1.3
↑ Summary Service/SessionFile.pm »
1 package Mojolicious::Plugin::SessionStorage;
2 0 ▶use Mojo::Base 'Mojolicious::Plugin';
Subroutine BEGIN: called CC=1 SCAR=2.6
3  
4 our $VERSION = '0.1.6';
5  
6 use Mojolicious::Sessions::Storage;
7  
8 sub register {
9 my ( $self, $app, $args ) = @_;
10 $args = { session_store => $args } unless ( ref $args eq 'HASH' );
11 my $sessions
12 = Mojolicious::Sessions::Storage->new(%$args);
13 $app->sessions($sessions);
14 return $sessions;
15 }
16  
17 =head1 NAME
18  
19 Mojolicious::Plugin::SessionStorage - session data store plugin for Mojolicious
20  
21 =head1 VERSION
22  
23 Version 0.01
24  
25 =cut
26  
27  
28  
29 =head1 SYNOPSIS
30  
31 use Mojolicious::Lite;
32 use Mojolicious::Session::Storage::File;
33 plugin SessionStore => Mojolicious::Session::Storage::File->new;
34  
35  
36 =head1 AUTHOR
37  
38 wfso, C<< <461663376 at qq.com> >>
39  
40 =cut
41  
42 1; # End of Mojolicious::Plugin::SessionStorage
↑ Summary Service/SessionFile.pm »