line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::HandlebarsRenderer; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
845
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
3
|
use parent qw(Mojolicious::Plugin); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
703
|
use MojoX::Renderer::Handlebars; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub register { |
12
|
0
|
|
|
0
|
1
|
|
my ($self, $app, $args) = @_; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
0
|
|
|
|
$args ||= {}; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $handlebars = MojoX::Renderer::Handlebars->build(app => $app, %$args); |
17
|
0
|
|
|
|
|
|
$app->renderer->add_handler(hbs => $handlebars); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |