This means we get the HTML skeleton correctly, and can kill the separate
`%not-found' component.
+++ /dev/null
-<%method title>Not found</%method>
-<h1>Not found</h1>
-Failed to find ‘<code><% $what |h %></code>’.
-% $m->abort(404);
-
-<%flags>
-inherit => ".html"
-</%flags>
-
-<%args>
-$what
-</%args>
$nrow => 4
</%args>
%#
-<%method title>Single hand</%method>
+<%method title>\
+% if ($fail) {
+Not found\
+% } else {
+Single hand\
+% }
+</%method>
+%#
+<%def .not-found>
+<h1>Not found</h1>
+Failed to find ‘<code><% $what |h %></code>’.
+% return 404;
+<%args>
+ $what
+</%args>
+</%def>
%#
<%once>
use Deal;
</%once>
%#
+<%shared>
+ my $fail = ($m->dhandler_arg ne "");
+</%shared>
+%#
<%init>
- unless ($m->dhandler_arg eq "") {
- $m->clear_buffer;
- $m->comp("%not-found", what => $m->dhandler_arg);
- }
+ return $m->comp(".not-found", what => $m->dhandler_arg)
+ if $fail;
</%init>