Branch Coverage

blib/lib/Text/PSP/Parser.pm
Criterion Covered Total %
branch 59 88 67.0


line true false branch
7 0 14 unless ref $engine
36 16 4 unless (defined $$self{'directory'})
46 19 0 if ($self->text)
58 25 41 if (s/^((.*?)<(%[!=@|]?))//s)
60 8 17 if defined $2 and $2 ne ''
66 34 10 if (@text)
67 22 12 unless $$self{'pushing'}
69 31 3 unless $$self{'in_quotes'}
73 19 25 unless (defined $_)
74 19 0 if $$self{'in_quotes'}
75 19 0 if $$self{'pushing'}
79 0 25 unless defined $switch
81 10 15 if ($switch eq '%=')
82 8 2 if $$self{'in_quotes'}
84 1 9 unless $$self{'pushing'}
89 3 12 if ($switch eq '%|') { }
1 11 elsif ($switch eq '%!') { }
6 5 elsif ($switch eq '%@') { }
90 0 3 unless $$self{'in_quotes'}
91 0 3 unless $$self{'pushing'}
103 2 3 if $$self{'in_quotes'}
104 2 3 if $$self{'pushing'}
107 5 0 if $switch eq '%'
116 9 24 if ($pos == -1)
118 1 8 unless defined($_ = readline $$self{'input'})
130 0 6 if ($$self{'pushing'})
153 6 0 if ($directive =~ s/^\s*(\w+)\s+//s)
157 6 0 defined $2 ? :
172 0 3 if ($error)
183 0 6 unless open INPUT, "< $$self{'engine'}{'template_root'}/$filename"
186 3 3 if defined $directory
188 2 4 if $$self{'in_quotes'}
189 2 4 if $$self{'pushing'}
199 0 3 unless defined $args{'file'}
208 0 3 unless defined $args{'file'}
213 3 5 if -f "$$self{'engine'}{'template_root'}$path/$filename"
214 0 5 if $path eq ''
218 0 3 unless $found
224 0 0 unless defined $args{'file'}
229 0 0 if -f "$$self{'engine'}{'template_root'}$path/$filename"
230 0 0 if $path eq ''
234 0 0 unless $found
235 0 0 if $$self{'in_quotes'}
237 0 0 unless $$self{'pushing'}