Branch Coverage

blib/lib/OpenGuides/Template.pm
Criterion Covered Total %
branch 98 106 92.4


line true false branch
123 1 255 unless $args{'template'}
124 0 255 unless my $config = $args{'config'}
142 14 241 if ($cookie_data{'omit_help_links'}) { }
145 8 233 if ($formatting_rules_node and not $formatting_rules_link)
152 8 1 if ($config->enable_page_deletion and lc $config->enable_page_deletion eq 'y' || $config->enable_page_deletion eq '1')
159 17 238 if ($cookie_data{'is_admin'})
190 143 112 if ($args{'node'})
197 27 228 unless $args{'vars'}
201 249 6 unless ($tt_vars->{'username'})
204 45 204 if ($prefs{'username'} ne 'Anonymous')
211 187 68 unless ($args{'noheaders'})
214 1 186 if (defined $args{'content_type'} and $args{'content_type'} eq '') { }
217 4 182 if ($args{'content_type'}) { }
224 2 185 if ($tt_vars->{'http_charset'})
229 8 179 if ($args{'http_status'})
307 359 371 unless $args{'metadata'}
319 371 359 if ($args{'metadata'}) { }
320 350 21 unless $metadata{'category'}
321 350 21 unless $metadata{'locale'}
347 87 57 $wiki->node_exists($name) ? :
360 44 41 $wiki->node_exists($name) ? :
367 371 359 $args{'metadata'} ? :
373 13 0 if ($website and $website ne 'http://' and is_web_uri($website))
377 6 7 if ($trunc_website =~ tr[/][] == 1)
380 2 11 if (length $trunc_website > $maxlen)
387 371 359 $args{'metadata'} ? :
390 371 359 $args{'metadata'} ? :
403 728 2 if ($config->enable_node_image)
406 1476 1436 $args{'metadata'} ? :
408 37 2875 if ($value)
412 36 2876 if $value
416 1 729 if (exists $metadata{'source'})
420 371 359 if ($args{'metadata'}) { }
428 341 30 if ($geo_handler == 1) { }
11 19 elsif ($geo_handler == 2) { }
479 233 126 if ($geo_handler == 1) { }
57 69 elsif ($geo_handler == 2) { }
69 0 elsif ($geo_handler == 3) { }
494 63 170 if (defined $os_x and length $os_x and defined $os_y and length $os_y) { }
17 153 elsif (defined $lat and length $lat and defined $long and length $long) { }
508 80 1 if (defined $os_x and length $os_x and defined $os_y and length $os_y)
518 1 232 if ($args{'set_coord_field_vars'})
543 55 2 if (defined $osie_x and length $osie_x and defined $osie_y and length $osie_y) { }
1 1 elsif (defined $lat and length $lat and defined $long and length $long) { }
556 56 0 if (defined $osie_x and length $osie_x and defined $osie_y and length $osie_y)
566 0 57 if ($args{'set_coord_field_vars'})
585 66 0 if (defined $lat and length $lat and defined $long and length $long)
603 0 69 if ($args{'set_coord_field_vars'})
621 6 724 if ($prefs{'latlong_traditional'})
623 8 4 unless defined $vars{$var} and length $vars{$var}
640 2 2 if ($degrees < 0) { }
0 2 elsif ($degrees == 0) { }
654 2 2 $isneg ? :