File Coverage

blib/lib/Mojolicious/Sessions/ThreeS/Storage.pm
Criterion Covered Total %
statement 6 9 66.6
branch n/a
condition n/a
subroutine 2 5 40.0
pod 3 3 100.0
total 11 17 64.7


line stmt bran cond sub pod time code
1             package Mojolicious::Sessions::ThreeS::Storage;
2             $Mojolicious::Sessions::ThreeS::Storage::VERSION = '0.003';
3 2     2   705 use Mojo::Base -base;
  2         2  
  2         12  
4 2     2   198 use Carp;
  2         2  
  2         220  
5              
6             =head1 NAME
7              
8             Mojolicious::Sessions::ThreeS::Storage - Abstract session storage base class
9              
10             =head1 SYNOPSIS
11              
12             Implement a subclass of this using C and implement
13             all methods marked as ABSTRACT.
14              
15             =cut
16              
17             =head2 get_session
18              
19             ABSTRACT
20              
21             Gets the session C from the given Id. Can return undef if the session
22             is expired or gone.
23              
24             Called by the framework like this:
25              
26             if( my $session = $this->get_session( $session_id ) ){
27             ...
28             }
29              
30             =cut
31              
32             sub get_session{
33 0     0 1   confess("Implement this");
34             }
35              
36             =head2 store_session
37              
38             ABSTRACT
39              
40             Stores the session C against the given ID. Called by the framework like this:
41              
42             $this->store_session( $session_id , $session );
43              
44             Note that the session might contain an C Epoch time (in seconds). You should
45             try to implement this expiry yourself to the best of the underlying storage ability.
46              
47             =cut
48              
49             sub store_session{
50 0     0 1   confess("Implement this");
51             }
52              
53             =head2 remove_session_id
54              
55             ABSTRACT
56              
57             Removes the session with the given session_id from the storage. This is idem-potent.
58              
59             Called by the framework like this:
60              
61             $this->remove_session_id( $session_id );
62              
63             =cut
64              
65             sub remove_session_id{
66 0     0 1   confess("Implement this");
67             }
68              
69             1;