blib/lib/Text/MicroMason/QuickTemplate.pm

filter: Statementstmt 89.4% 17 / 19 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 5 totaltotal 73.5% 25 / 34 CC 3 SCAR 6.3
CC
3
Cov
87%
lex_token
3.0
clear_values
2.0
import
1.0
CRAP 1.9
« blib/lib/Text/MicroMason/ApacheHandler.pm ↑ Summary blib/lib/Text/MicroMason/ExecuteCache.pm »
1 package Text::MicroMason::QuickTemplate;
2  
3 1 require Text::MicroMason::Base;
4 1 require Text::MicroMason::StoreOne;
5 1 require Text::MicroMason::HasParams;
6 1 push @ISA, map "Text::MicroMason::$_", qw( StoreOne HasParams );
7  
8 1 require Exporter;
9 1 $DONTSET = \"";
10 1 ▶sub import { @EXPORT = '$DONTSET'; goto &Exporter::import }
Subroutine import: called CC=1 SCAR=0.0
11  
12 ######################################################################
13  
14 3 ▶sub defaults {
Subroutine defaults: called CC=1 SCAR=0.0
Pod undocumented
15 3 (shift)->NEXT('defaults'), delimiters => [ '{{', '}}' ],
16 }
17  
18 ######################################################################
19  
20 31 ▶sub lex_token {
Subroutine lex_token: called CC=3 SCAR=11.0
Pod undocumented
21 31 my $self = shift;
22
23 31 my ($l_delim, $r_delim) = @{ $self->{'delimiters'} };
24 31 ▶ /\G \Q$l_delim\E (.*?) \Q$r_delim\E/gcxs ? ( expr =>
Branch: 2 branches
BranchTrueFalseTotal
/\G \Q$l_delim\E (.*?) \Q$r_delim\E/cgsx ? : 14 17 31
/\G ( (?: [^\{] | \{(?!\{) )+ ) /cgsx ? : 17 0 17
25 'my @param = $m->param(' . "'\Q$1\E'" . ');
26 scalar @param or die "could not resolve the following symbol: ' . $1 . '";
27 ( $param[0] eq "' . $DONTSET . '" ) ? "{{' . $1 . '}}" : $param[0]' ) :
28
29 # Things that don't match the above
30 /\G ( (?: [^\{] | \{(?!\{) )+ ) /gcxs ? ( 'text' => $1 ) :
31
32 ()
33 }
34  
35 ######################################################################
36  
37 7 ▶sub fill { (shift)->execute_again( @_ ) }
Subroutine fill: called CC=1 SCAR=0.0
Pod undocumented
38  
39 2 ▶sub pre_fill { unshift @{ (shift)->{params} }, { @_ } }
Subroutine pre_fill: called CC=1 SCAR=0.0
Pod undocumented
40  
41 0 ▶sub clear_values { @{ (shift)->{params} } = () }
Subroutine clear_values: not called CC=1 SCAR=6.9
Pod undocumented
42  
43 ######################################################################
44  
45 1 1;
46  
47 __END__
« blib/lib/Text/MicroMason/ApacheHandler.pm ↑ Summary blib/lib/Text/MicroMason/ExecuteCache.pm »