4 use Catalyst qw/-Engine=HTTP/;
7 __PACKAGE__->config( name => 'ExternalCatty' );
10 sub default : Private {
11 my ( $self, $c ) = @_;
12 $c->response->content_type('text/html; charset=utf-8');
13 $c->response->output( html( 'Root', 'Hello, test ☺!' ) );
17 my ( $title, $body ) = @_;
21 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29 # The Cat HTTP server background option is useless here :-(
30 # Thus we have to provide our own background method.
35 die "Can't fork Cat HTTP server: $!" unless defined $child;
36 return $child if $child;
38 if ( $^O !~ /MSWin32/ ) {
40 POSIX::setsid() or die "Can't start a new session: $!";