Your browser is ancient, upgrade to see the full glory of this presentation!

slice up the dinosaur

what is a session anyway

in essence
Catalyst
server side
Mojo
client side

what is Plack and why bother

in essence

if(m/web framework/){
    run;
}
            

use CatApp;
...
mount "/" => CatApp
    ->apply_default_middlewares(
        CatApp->psgi_app
      );
            

my $oauth2 = Mojo::Server::PSGI->new;
$oauth2->load_app('oauth/oauth');
my $mojo_oauth2 = sub {
    my $env = shift;
    $env->{MOJO_HOME} = 'oauth';
    $oauth2->run($env);
};
...
mount "/oauth2" => builder {$mojo_oauth2};
            

builder {
    mount "/oauth2" => builder{$mojo};
    mount "/dancer" => builder{$dancer};
    mount "/kelp" => builder{$kelp};
    mount "/" => CatApp
        ->apply_default_middlewares(
            CatApp->psgi_app
        );
}
            

migrate Catalyst

Mojo
Dancer
Kelp

use Plack::Session::Store::KyotoTycoon;
use Plack::Session::State::Cookie;

enable 'Session',
    state => 
    Plack::Session::State::Cookie->new(),
    store => 
    Plack::Session::Store::KyotoTycoon->new();
            
starman
nginx
@norbu09