package Moxy::Plugin::Status::404; use strict; use warnings; use base qw/Moxy::Plugin/; sub status_handler : Hook { my ( $self, $context, $args ) = @_; my $response = $args->{response}; # handle internal server error # do not display f*cking plain html page when got a 404. if ($response->code eq 404 && $response->content !~ //) { $response->content_type('text/html'); $response->content(qq{ file not found occured
you got a 'file not found'
@{[ $response->content ]}
-- moxy
}); } $response; } 1;