| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Tenjin::Preprocessor; |
|
2
|
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
44
|
use strict; |
|
|
7
|
|
|
|
|
14
|
|
|
|
7
|
|
|
|
|
345
|
|
|
4
|
7
|
|
|
7
|
|
40
|
use warnings; |
|
|
7
|
|
|
|
|
11
|
|
|
|
7
|
|
|
|
|
1863
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.070001"; |
|
7
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = ('Tenjin::Template'); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Tenjin::Preprocessor - Preprocessing Tenjin templates |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 VERSION |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
version 0.070001 |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
used internally. |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This module provides some methods needed for preprocessing templates. |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 INTERNAL METHODS |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 stmt_pattern() |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub stmt_pattern { |
|
34
|
0
|
|
|
0
|
1
|
|
return shift->SUPER::compile_stmt_pattern('PL'); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 expr_pattern() |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub expr_pattern { |
|
42
|
0
|
|
|
0
|
1
|
|
return qr/\[\*=(=?)(.*?)(=?)=\*\]/s; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 add_expr() |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub add_expr { |
|
50
|
0
|
|
|
0
|
1
|
|
my ($self, $bufref, $expr, $flag_escape) = @_; |
|
51
|
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
$expr = "decode_params($expr)"; |
|
53
|
0
|
|
|
|
|
|
$self->SUPER::add_expr($bufref, $expr, $flag_escape); |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
L, L. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 AUTHOR |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
The CPAN version of Tenjin was forked by Ido Perlmuter Eido at ido50.netE |
|
65
|
|
|
|
|
|
|
from version 0.0.2 of the original plTenjin, which is developed by Makoto Kuwata |
|
66
|
|
|
|
|
|
|
at L. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Development of Tenjin is done with github at L. |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Tenjin is licensed under the MIT license. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Copyright (c) 2007-2010 the aforementioned authors. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining |
|
77
|
|
|
|
|
|
|
a copy of this software and associated documentation files (the |
|
78
|
|
|
|
|
|
|
"Software"), to deal in the Software without restriction, including |
|
79
|
|
|
|
|
|
|
without limitation the rights to use, copy, modify, merge, publish, |
|
80
|
|
|
|
|
|
|
distribute, sublicense, and/or sell copies of the Software, and to |
|
81
|
|
|
|
|
|
|
permit persons to whom the Software is furnished to do so, subject to |
|
82
|
|
|
|
|
|
|
the following conditions: |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be |
|
85
|
|
|
|
|
|
|
included in all copies or substantial portions of the Software. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
88
|
|
|
|
|
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
89
|
|
|
|
|
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
90
|
|
|
|
|
|
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
|
91
|
|
|
|
|
|
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
|
92
|
|
|
|
|
|
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
93
|
|
|
|
|
|
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |