Branch Coverage

blib/lib/Text/TagTemplate.pm
Criterion Covered Total %
branch 98 140 70.0


line true false branch
146 0 300 if defined $class and not ref $class and $class eq 'Text::TagTemplate'
148 300 0 if defined $class and ref $class eq 'Text::Template' || UNIVERSAL::isa($class, 'Text::TagTemplate')
151 0 0 unless defined $default_object
166 0 19 unless open GET_FILE, "<$file"
168 0 19 unless close GET_FILE
180 0 0 unless defined $str
196 0 0 unless defined $str
785 2 1 if @tags
834 2 0 if ($pattern)
867 2 0 if ($pattern)
888 2 0 if ($pattern)
930 2 0 if defined $auto_cap
954 2 1 if defined $unknown_action
971 2 8 if (@tags)
991 7 0 if $$self{'AUTO_CAP'}
1004 0 1 if (exists $params{'ENTRY_STRING'}) { }
1 0 elsif (exists $params{'ENTRY_FILE'}) { }
1011 0 1 if (exists $params{'JOIN_STRING'}) { }
0 1 elsif (exists $params{'JOIN_FILE'}) { }
1060 4 2 if (@tags > 1) { }
2 0 elsif (@tags == 1) { }
1066 14 0 $$self{'AUTO_CAP'} ? :
1083 1 0 $$self{'AUTO_CAP'} ? :
1115 1 1 if @list
1130 1 1 if defined $template_string
1145 1 1 if defined $template_file
1161 1 1 if defined $entry_string
1177 1 1 if defined $entry_file
1195 1 1 if defined $entry_callback
1211 1 1 if defined $join_string
1227 1 1 if defined $join_file
1244 1 3 if (@join_tags > 1) { }
1 2 elsif (@join_tags == 1) { }
1249 2 2 if (defined $join_tags)
1252 4 0 $$self{'AUTO_CAP'} ? :
1273 105 1 defined $string ? :
1275 83 23 if (@tags) { }
1276 4 79 if (@tags > 1) { }
1283 91 0 $$self{'AUTO_CAP'} ? :
1319 8 0 defined $value ? :
1332 8 0 if $$self{'AUTO_CAP'}
1338 1 118 unless (exists $$tags{$uc_tag})
1339 0 1 if ($$self{'UNKNOWN_ACTION'} eq 'CONFESS') { }
0 1 elsif ($$self{'UNKNOWN_ACTION'} eq 'CLUCK') { }
1 0 elsif ($$self{'UNKNOWN_ACTION'} eq 'IGNORE') { }
1354 1 118 unless defined $action
1358 110 9 if (not $type) { }
1362 0 9 if ($type eq 'SCALAR') { }
9 0 elsif ($type eq 'CODE') { }
1375 0 119 if (exists $params{'HTMLESC'}) { }
0 119 elsif (exists $params{'URLESC'}) { }
1380 0 119 if (exists $params{'SELECTEDIF'}) { }
0 119 elsif (exists $params{'CHECKEDIF'}) { }
1381 0 0 if ($rep eq $params{'VALUE'}) { }
1387 0 0 if ($rep eq $params{'VALUE'}) { }
1401 7 99 if ($$self{'UNKNOWN_ACTION'} eq 'IGNORE')
1421 3 1 defined $file ? :
1461 14 1 defined $list ? :
1463 13 2 defined $entry_string ? :
1465 12 3 defined $join_string ? :
1467 7 8 defined $entry_callback ? :
1469 2 13 if (@join_tags > 1) { }
2 11 elsif (@join_tags == 1) { }
1490 15 0 @element_strings ? :
1514 6 1 defined $list ? :
1516 5 2 defined $entry_file ? :
1518 4 3 defined $join_file ? :
1519 7 0 defined $entry_file ? :
1521 7 0 defined $join_file ? :
1525 3 4 if defined $entry_callback