Branch Coverage

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


line true false branch
123 1 251 unless $args{'template'}
124 0 251 unless my $config = $args{'config'}
142 14 237 if ($cookie_data{'omit_help_links'}) { }
145 8 229 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 234 if ($cookie_data{'is_admin'})
190 139 112 if ($args{'node'})
197 27 224 unless $args{'vars'}
201 245 6 unless ($$tt_vars{'username'})
204 45 200 if ($prefs{'username'} ne 'Anonymous')
211 183 68 unless ($args{'noheaders'})
214 1 182 if (defined $args{'content_type'} and $args{'content_type'} eq '') { }
217 4 178 if ($args{'content_type'}) { }
224 2 181 if ($$tt_vars{'http_charset'})
229 8 175 if ($args{'http_status'})
307 357 364 unless $args{'metadata'}
319 364 357 if ($args{'metadata'}) { }
320 346 18 unless $metadata{'category'}
321 344 20 unless $metadata{'locale'}
347 85 54 $wiki->node_exists($name) ? :
360 42 40 $wiki->node_exists($name) ? :
367 364 357 $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 364 357 $args{'metadata'} ? :
390 364 357 $args{'metadata'} ? :
403 719 2 if ($config->enable_node_image)
406 1448 1428 $args{'metadata'} ? :
408 37 2839 if ($value)
412 36 2840 if $value
416 1 720 if (exists $metadata{'source'})
420 364 357 if ($args{'metadata'}) { }
428 334 30 if ($geo_handler == 1) { }
11 19 elsif ($geo_handler == 2) { }
473 231 126 if ($geo_handler == 1) { }
57 69 elsif ($geo_handler == 2) { }
69 0 elsif ($geo_handler == 3) { }
488 63 168 if (defined $os_x and length $os_x and defined $os_y and length $os_y) { }
17 151 elsif (defined $lat and length $lat and defined $long and length $long) { }
502 80 1 if (defined $os_x and length $os_x and defined $os_y and length $os_y)
512 1 230 if ($args{'set_coord_field_vars'})
537 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) { }
550 56 0 if (defined $osie_x and length $osie_x and defined $osie_y and length $osie_y)
560 0 57 if ($args{'set_coord_field_vars'})
579 66 0 if (defined $lat and length $lat and defined $long and length $long)
597 0 69 if ($args{'set_coord_field_vars'})
615 6 715 if ($prefs{'latlong_traditional'})
617 8 4 unless defined $vars{$var} and length $vars{$var}
634 2 2 if ($degrees < 0) { }
0 2 elsif ($degrees == 0) { }
648 2 2 $isneg ? :