line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Jemplate::Parser; |
2
|
22
|
|
|
22
|
|
233
|
use strict; |
|
22
|
|
|
|
|
50
|
|
|
22
|
|
|
|
|
1353
|
|
3
|
22
|
|
|
22
|
|
138
|
use warnings; |
|
22
|
|
|
|
|
50
|
|
|
22
|
|
|
|
|
910
|
|
4
|
22
|
|
|
22
|
|
133
|
use base 'Template::Parser'; |
|
22
|
|
|
|
|
190
|
|
|
22
|
|
|
|
|
1609
|
|
5
|
|
|
|
|
|
|
|
6
|
22
|
|
|
22
|
|
67437
|
use Jemplate::Grammar; |
|
22
|
|
|
|
|
33463
|
|
|
22
|
|
|
|
|
5613
|
|
7
|
22
|
|
|
22
|
|
22717
|
use Jemplate::Directive; |
|
22
|
|
|
|
|
86
|
|
|
22
|
|
|
|
|
3610
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
38
|
|
|
38
|
1
|
670
|
my $class = shift; |
11
|
38
|
|
|
|
|
344
|
my $parser = $class->SUPER::new( |
12
|
|
|
|
|
|
|
GRAMMAR => Jemplate::Grammar->new(), |
13
|
|
|
|
|
|
|
FACTORY => 'Jemplate::Directive', |
14
|
|
|
|
|
|
|
@_, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# flags passed from Jemplate object |
18
|
38
|
|
|
|
|
2070
|
my %args = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# eval-javascript is default "on" |
21
|
38
|
100
|
|
|
|
193
|
$parser->{EVAL_JAVASCRIPT} = exists $args{EVAL_JAVASCRIPT} |
22
|
|
|
|
|
|
|
? $args{EVAL_JAVASCRIPT} : 1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# tie the parser state-variable to the global Directive var |
25
|
38
|
|
|
|
|
180
|
$parser->{INJAVASCRIPT} = \$Jemplate::Directive::INJAVASCRIPT; |
26
|
|
|
|
|
|
|
|
27
|
38
|
|
|
|
|
141
|
return $parser; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |