line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::HamlRenderer; |
2
|
|
|
|
|
|
|
our $VERSION = '2.100000'; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
3641
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
118
|
|
5
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
104
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
16
|
use base 'Mojolicious::Plugin'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1882
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1439
|
use MojoX::Renderer::Haml; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
31
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub register { |
12
|
1
|
|
|
1
|
1
|
60
|
my ($self, $app, $args) = @_; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
50
|
|
|
7
|
$args ||= {}; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
6
|
my $haml = MojoX::Renderer::Haml->build(%$args, mojo => $app); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Add "haml" handler |
19
|
1
|
|
|
|
|
32
|
$app->renderer->add_handler(haml => $haml); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Mojolicious::Plugin::HamlRenderer - Load HAML renderer |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# lite app |
31
|
|
|
|
|
|
|
plugin 'haml_renderer'; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# or normal app |
34
|
|
|
|
|
|
|
$self->plugin('haml_renderer'); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Simple plugin to load HAML renderer into your Mojolicious app. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SEE ALSO |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
L, L. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |