X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FCattySession.pm;h=ed910146cb5d6967658f94e4b2382a1c34e5b67f;hb=c20c8103da6848b68f8334f938c5a8f28c2c8fc7;hp=9d3138c313402e67aec4822dc22fe9b763559cc1;hpb=db8bd5bb817d8a84ea517cdd065c1fd026392207;p=catagits%2FTest-WWW-Mechanize-Catalyst.git diff --git a/t/lib/CattySession.pm b/t/lib/CattySession.pm index 9d3138c..ed91014 100644 --- a/t/lib/CattySession.pm +++ b/t/lib/CattySession.pm @@ -1,51 +1,21 @@ package CattySession; use strict; +use warnings; -#use Catalyst; use Catalyst qw/ Session Session::State::Cookie Session::Store::Dummy - /; +/; use Cwd; -use MIME::Base64; -our $VERSION = '0.01'; - -CattySession->config( +__PACKAGE__->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. - -}; -} +__PACKAGE__->setup; 1;