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   14271 use strict;
  8         23  
  8         243  
4 8     8   56 use warnings;
  8         16  
  8         183  
5 8     8   180 use 5.010001;
  8         43  
6              
7             # ABSTRACT: Template Renderer Plugin for Mojolicious
8             our $VERSION = '1.60'; # VERSION
9              
10 8     8   60 use base 'Mojolicious::Plugin';
  8         20  
  8         1320  
11              
12 8     8   187711 use Mojolicious::Plugin::TtRenderer::Engine;
  8         25  
  8         59  
13              
14             sub register {
15 7     7 1 335 my ($self, $app, $args) = @_;
16              
17 7   50     30 $args ||= {};
18              
19 7         44 my $tt = Mojolicious::Plugin::TtRenderer::Engine->build(%$args, app => $app);
20              
21             # Add "tt" handler
22 7         40 $app->renderer->add_handler(tt => $tt);
23             }
24              
25             $Mojolicious::Plugin::TtRenderer::VERSION //= ('devel');
26              
27             1;
28              
29             __END__