Make test less noisy by removing -Debug and cleaning up wide charin print errors
[catagits/Test-WWW-Mechanize-Catalyst.git] / t / lib / CattySession.pm
CommitLineData
6bc86362 1package CattySession;
2
3use strict;
4
5#use Catalyst;
db8bd5bb 6use Catalyst qw/
6bc86362 7 Session
8 Session::State::Cookie
9 Session::Store::Dummy
10 /;
11use Cwd;
12use MIME::Base64;
13
14our $VERSION = '0.01';
15
16CattySession->config(
17 name => 'CattySession',
18 root => cwd . '/t/root',
19);
20
21CattySession->setup();
22
23sub auto : Private {
24 my ( $self, $context ) = @_;
25 if ( $context->session ) {
26 return 1;
27 }
28
29}
30
31sub default : Private {
32 my ( $self, $context ) = @_;
33 my $html = html( "Root", "This is the root page" );
34 $context->response->content_type("text/html");
35 $context->response->output($html);
36}
37
38sub html {
39 my ( $title, $body ) = @_;
40 return qq{
41<html>
42<head><title>$title</title></head>
43<body>
44$body
45<a href="/hello/">Hello</a>.
46</body></html>
47};
48}
49
501;
51