package CattySession; use strict; #use Catalyst; use Catalyst qw/-Debug Session Session::State::Cookie Session::Store::Dummy /; use Cwd; use MIME::Base64; our $VERSION = '0.01'; CattySession->config( name => 'CattySession', root => cwd . '/t/root', ); CattySession->setup(); sub auto : Private { my ( $self, $context ) = @_; if ( $context->session ) { return 1; } } sub default : Private { my ( $self, $context ) = @_; my $html = html( "Root", "This is the root page" ); $context->response->content_type("text/html"); $context->response->output($html); } sub html { my ( $title, $body ) = @_; return qq{ $title $body Hello. }; } 1;