| 1 | package Lemplate::Parser; | ||||||||||
| 2 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 8 | ▶ | use base 'Template::Parser'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 8 | our $VERSION = '0.15'; | |||||||||
| 7 | |||||||||||
| 8 | 8 | ▶ | use Lemplate::Grammar; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 8 | ▶ | use Lemplate::Directive; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 12 | 0 | my $class = shift; | |||||||||
| 13 | 0 | my $parser = $class->SUPER::new( | |||||||||
| 14 | GRAMMAR => Lemplate::Grammar->new(), | ||||||||||
| 15 | FACTORY => 'Lemplate::Directive', | ||||||||||
| 16 | @_, | ||||||||||
| 17 | ); | ||||||||||
| 18 | |||||||||||
| 19 | # flags passed from Lemplate object | ||||||||||
| 20 | 0 | my %args = @_; | |||||||||
| 21 | |||||||||||
| 22 | # eval-javascript is default "on" | ||||||||||
| 23 | $parser->{EVAL_JAVASCRIPT} = exists $args{EVAL_JAVASCRIPT} | ||||||||||
| 24 | 0 | ▶ | ? $args{EVAL_JAVASCRIPT} : 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | # tie the parser state-variable to the global Directive var | ||||||||||
| 27 | 0 | $parser->{INJAVASCRIPT} = \$Lemplate::Directive::INJAVASCRIPT; | |||||||||
| 28 | |||||||||||
| 29 | 0 | return $parser; | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 8 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||