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