line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Haml; |
2
|
4
|
|
|
4
|
|
140708
|
use 5.006; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
185
|
|
3
|
4
|
|
|
4
|
|
25
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
216
|
|
4
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
252
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
4
|
|
|
4
|
|
81
|
our $VERSION = '0.1.2'; # VERSION |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
4213
|
use parent 'Template::Plugin::Filter'; |
|
4
|
|
|
|
|
1545
|
|
|
4
|
|
|
|
|
23
|
|
10
|
4
|
|
|
4
|
|
17954
|
use Text::Haml; |
|
4
|
|
|
|
|
178414
|
|
|
4
|
|
|
|
|
626
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub init { |
13
|
4
|
|
|
4
|
1
|
293652
|
my $self = shift; |
14
|
4
|
|
|
|
|
42
|
$self->{_DYNAMIC} = 1; |
15
|
4
|
|
50
|
|
|
68
|
$self->install_filter( $self->{_ARGS}->[0] || 'haml'); |
16
|
4
|
|
|
|
|
191
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub filter { |
20
|
4
|
|
|
4
|
1
|
2546
|
my ( $self, $text ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
4
|
|
|
|
|
41
|
my $haml = Text::Haml->new; |
23
|
4
|
|
|
|
|
553
|
return $haml->render($text); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
# ABSTRACT: Haml plugin for Template Toolkit |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |