line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Jemplate::Parser; |
2
|
22
|
|
|
22
|
|
95
|
use strict; |
|
22
|
|
|
|
|
32
|
|
|
22
|
|
|
|
|
755
|
|
3
|
22
|
|
|
22
|
|
92
|
use warnings; |
|
22
|
|
|
|
|
30
|
|
|
22
|
|
|
|
|
601
|
|
4
|
22
|
|
|
22
|
|
89
|
use base 'Template::Parser'; |
|
22
|
|
|
|
|
30
|
|
|
22
|
|
|
|
|
959
|
|
5
|
|
|
|
|
|
|
|
6
|
22
|
|
|
22
|
|
36095
|
use Jemplate::Grammar; |
|
22
|
|
|
|
|
18895
|
|
|
22
|
|
|
|
|
3272
|
|
7
|
22
|
|
|
22
|
|
9794
|
use Jemplate::Directive; |
|
22
|
|
|
|
|
43
|
|
|
22
|
|
|
|
|
2445
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
18
|
|
|
18
|
1
|
273
|
my $class = shift; |
11
|
18
|
|
|
|
|
151
|
my $parser = $class->SUPER::new( |
12
|
|
|
|
|
|
|
GRAMMAR => Jemplate::Grammar->new(), |
13
|
|
|
|
|
|
|
FACTORY => 'Jemplate::Directive', |
14
|
|
|
|
|
|
|
@_, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# flags passed from Jemplate object |
18
|
0
|
|
|
|
|
|
my %args = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# eval-javascript is default "on" |
21
|
0
|
0
|
|
|
|
|
$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
|
0
|
|
|
|
|
|
$parser->{INJAVASCRIPT} = \$Jemplate::Directive::INJAVASCRIPT; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $parser; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Jemplate::Parser - Jemplate Parser Subclass |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use Jemplate::Parser; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Jemplate::Parser is a simple subclass of Template::Parser. Not much |
43
|
|
|
|
|
|
|
to see here. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Ingy döt Net |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 COPYRIGHT |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Copyright (c) 2006-2008. Ingy döt Net. All rights reserved. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
54
|
|
|
|
|
|
|
under the same terms as Perl itself. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
See L |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |