1 package ExternalCatty::Controller::Root;
5 use base qw/ Catalyst::Controller /;
7 __PACKAGE__->config( namespace => '' );
9 sub default : Private {
10 my ( $self, $c ) = @_;
11 $c->response->content_type('text/html; charset=utf-8');
12 $c->response->output( html( 'Root', 'Hello, test ☺!' ) );
15 # redirect to a redirect
17 my ( $self, $context ) = @_;
18 my $where = $context->uri_for('/');
19 $context->response->redirect($where);
24 my ( $title, $body ) = @_;
28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
39 my $host = $c->req->header('Host') || "<undef>";
40 my $html = html( $c->config->{name}, "Host: $host" );
41 $c->response->content_type("text/html");
42 $c->response->output($html);