line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::TtRenderer; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
14840
|
use strict; |
|
8
|
|
|
|
|
23
|
|
|
8
|
|
|
|
|
244
|
|
4
|
8
|
|
|
8
|
|
41
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
183
|
|
5
|
8
|
|
|
8
|
|
182
|
use 5.016; |
|
8
|
|
|
|
|
45
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Template Renderer Plugin for Mojolicious |
8
|
|
|
|
|
|
|
our $VERSION = '1.61'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
8
|
|
|
8
|
|
47
|
use base 'Mojolicious::Plugin'; |
|
8
|
|
|
|
|
25
|
|
|
8
|
|
|
|
|
1176
|
|
11
|
|
|
|
|
|
|
|
12
|
8
|
|
|
8
|
|
164928
|
use Mojolicious::Plugin::TtRenderer::Engine; |
|
8
|
|
|
|
|
23
|
|
|
8
|
|
|
|
|
65
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub register { |
15
|
7
|
|
|
7
|
1
|
345
|
my ($self, $app, $args) = @_; |
16
|
|
|
|
|
|
|
|
17
|
7
|
|
50
|
|
|
32
|
$args ||= {}; |
18
|
|
|
|
|
|
|
|
19
|
7
|
|
|
|
|
42
|
my $tt = Mojolicious::Plugin::TtRenderer::Engine->build(%$args, app => $app); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Add "tt" handler |
22
|
7
|
|
|
|
|
48
|
$app->renderer->add_handler(tt => $tt); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$Mojolicious::Plugin::TtRenderer::VERSION //= ('devel'); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |