The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Plack::Middleware::Debug::Dancer::TemplateTimer - Template and layout rendering timer for Dancer

VERSION

0.001

SYNOPSIS

To activate this panel:

    plack_middlewares:
      Debug:
        - panels
        -
          - Dancer::TemplateTimer

Or by manually creating an app.psgi, that might contain:

    builder {
        enable 'Debug', panels => ['Dancer::TemplateTimer'];
        $app;
    };

DESCRIPTION

This middleware adds timers around calls to "render" in Dancer::Template::Abstract and "layout" in Dancer::Template::Abstract to track the time spent rendering the template and the layout for the page.

This module uses "install_modifier" in Class::Method::Modifiers rather than adding hooks since we want to be sure we are only timing the template engine and not other code inside hooks.

AUTHOR

Peter Mottram (SysPete), <peter at sysnix.com>

LICENSE AND COPYRIGHT

Copyright 2016 Peter Mottram (SysPete).

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.