line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tenjin::Preprocessor; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
29
|
use strict; |
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
248
|
|
4
|
8
|
|
|
8
|
|
27
|
use warnings; |
|
8
|
|
|
|
|
8
|
|
|
8
|
|
|
|
|
1097
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "1.000001"; |
7
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = ('Tenjin::Template'); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Tenjin::Preprocessor - Preprocessing Tenjin templates |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
used internally. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
This module provides some methods needed for preprocessing templates. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 INTERNAL METHODS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 stmt_pattern() |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub stmt_pattern { |
30
|
0
|
|
|
0
|
1
|
|
return shift->SUPER::compile_stmt_pattern('PL'); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 expr_pattern() |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub expr_pattern { |
38
|
0
|
|
|
0
|
1
|
|
return qr/\[\*=(=?)(.*?)(=?)=\*\]/s; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 add_expr() |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub add_expr { |
46
|
0
|
|
|
0
|
1
|
|
my ($self, $bufref, $expr, $flag_escape) = @_; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
$expr = "decode_params($expr)"; |
49
|
0
|
|
|
|
|
|
$self->SUPER::add_expr($bufref, $expr, $flag_escape); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SEE ALSO |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
L, L. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR, LICENSE AND COPYRIGHT |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
See L. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |