MyApp.pm
package MyApp; use strict; use warnings; use HTML::Entities; sub handler { my ($request) = @_; my $response = HTTP::Engine::Response->new(), $response->content_type( q{text/html} ); my $body = q{<h1>Hello, World!</h1>}; my $name = encode_entities($request->param('name')); $body .= qq{<p>Greetings $name.</p>}; $response->body( $body ); return $response; }