[Dancer-users] Dynamic 404,500 error pages

David Precious davidp at preshweb.co.uk
Tue Feb 22 23:18:03 CET 2011



"Thomas Maier" <hayzer at gmail.com> wrote:

>Hi all,
>
>Is it possible to use TT to build the content
>of the 404 and 500 error sites dynamically ?

I don't recall a particularly clean way to do it currently, but you should be able to add a final route that matches anything, e.g.:

  get qr(/.*) => sub {
      status 'not_found';
      template '404page';
  }

Expect cleaner ways coming soon :)
-- 
David Precious <davidp at preshweb.co.uk>
Sent from my phone so please excuse brevity / poor quoting style etc


More information about the Dancer-users mailing list