File Coverage

blib/lib/Mojolicious/Plugin/SessionStore.pm
Criterion Covered Total %
statement 11 11 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 16 17 94.1


line stmt bran cond sub pod time code
1             package Mojolicious::Plugin::SessionStore;
2 1     1   2826 use Mojo::Base 'Mojolicious::Plugin';
  1         3  
  1         10  
3              
4             our $VERSION = '0.04';
5              
6 1     1   1679 use Mojolicious::Sessions::Storable;
  1         4  
  1         15  
7              
8             sub register {
9 1     1 1 51 my ( $self, $app, $args ) = @_;
10 1 50       8 $args = { session_store => $args } unless ( ref $args eq 'HASH' );
11 1         5 my $sessions
12             = Mojolicious::Sessions::Storable->new(%$args);
13 1         25 $app->sessions($sessions);
14 1         54 return $sessions;
15             }
16              
17             1;
18             __END__