#!perl -w use strict; use warnings; use utf8; use Plack::Builder; my $valid_html = q{ hoge

fuga

}; my $error_html = q{ hoge

fuga

hoge }; builder { enable 'HTMLLint'; mount '/text' => sub { return [200, ['Content-Type' => 'text/plain'], [ 'OK' ]]; }; mount '/valid_html' => sub { return [200, ['Content-Type' => 'text/html'], [$valid_html]]; }; mount '/error_html' => sub { return [200, ['Content-Type' => 'text/html'], [$error_html]]; }; };