Sessions/ThreeS/State.pm

filter: Statementstmt 80.0% 8 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 75.0% 12 / 16 CC 1 SCAR 4.1
CC
1
Cov
80%
get_session_id
2.0
set_session_id
2.0
BEGIN
1.0
CRAP 1.5
« Sessions/ThreeS/Storage.pm ↑ Summary Sessions/ThreeS/Storage/Memory.pm »
1 package Mojolicious::Sessions::ThreeS::State;
2 3 $Mojolicious::Sessions::ThreeS::State::VERSION = '0.004';
3 3 ▶use Mojo::Base -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 Mojolicious::Sessions::ThreeS::State - Abstract session state manager
9  
10 =head1 SYNOPSIS
11  
12 Implement a subclass of this using C<Mojo::Base> and implement
13 all methods marked as ABSTRACT
14  
15 =cut
16  
17 =head2 get_session_id
18  
19 ABSTRACT
20  
21 Return the current session_id if such a thing exists. Undef otherwise.
22  
23 Called by the framework like this:
24  
25 if( my $session_id = $this->get_session_id( $controller ) ){
26 ...
27 }
28  
29 =cut
30  
31 0 ▶sub get_session_id{
Subroutine get_session_id: not called CC=1 SCAR=6.9
Pod documented
32 0 confess("Implement this");
33 }
34  
35 =head2 set_session_id
36  
37 ABSTRACT
38  
39 Sets the given session_id against the client using the given L<Mojolicious::Controller>
40  
41 Called by the framework like this:
42  
43 $this->set_session_id( $controller, $session_id , \%options );
44  
45 Options can include:
46  
47 expires: an epoch at which to expire the state. Please make your best effort to respect this if present.
48  
49 =cut
50  
51 0 ▶sub set_session_id{
Subroutine set_session_id: not called CC=1 SCAR=6.9
Pod documented
52 0 confess("Implement this");
53 }
54  
55 3 1;
« Sessions/ThreeS/Storage.pm ↑ Summary Sessions/ThreeS/Storage/Memory.pm »