Lemplate/Parser.pm

filter: Statementstmt 73.9% 17 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 71.8% 23 / 32 CC 2 SCAR 8.9
CC
2
Cov
68%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
« Lemplate/Directive.pm ↑ Summary Lemplate/Grammar.pm »
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
BranchTrueFalseTotal
exists $args{'EVAL_JAVASCRIPT'} ? : 0 0 0
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__
« Lemplate/Directive.pm ↑ Summary Lemplate/Grammar.pm »