File Coverage

blib/lib/Mojolicious/Plugin/TtRenderer.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition 1 2 50.0
subroutine 6 6 100.0
pod 1 1 100.0
total 26 27 96.3


line stmt bran cond sub pod time code
1             package Mojolicious::Plugin::TtRenderer;
2              
3 8     8   15385 use strict;
  8         21  
  8         253  
4 8     8   43 use warnings;
  8         19  
  8         193  
5 8     8   173 use 5.016;
  8         46  
6              
7             # ABSTRACT: Template Renderer Plugin for Mojolicious
8             our $VERSION = '1.62'; # VERSION
9              
10 8     8   45 use base 'Mojolicious::Plugin';
  8         29  
  8         1355  
11              
12 8     8   215353 use Mojolicious::Plugin::TtRenderer::Engine;
  8         25  
  8         60  
13              
14             sub register {
15 7     7 1 372 my ($self, $app, $args) = @_;
16              
17 7   50     32 $args ||= {};
18              
19 7         46 my $tt = Mojolicious::Plugin::TtRenderer::Engine->build(%$args, app => $app);
20              
21             # Add "tt" handler
22 7         49 $app->renderer->add_handler(tt => $tt);
23             }
24              
25             $Mojolicious::Plugin::TtRenderer::VERSION //= ('devel');
26              
27             1;
28              
29             __END__