| 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; | |