Branch Coverage

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


line true false branch
123 1 256 unless $args{'template'}
124 0 256 unless my $config = $args{'config'}
142 14 242 if ($cookie_data{'omit_help_links'}) { }
145 8 234 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 239 if ($cookie_data{'is_admin'})
191 144 112 if ($args{'node'})
198 27 229 unless $args{'vars'}
202 250 6 unless ($tt_vars->{'username'})
205 45 205 if ($prefs{'username'} ne 'Anonymous')
212 188 68 unless ($args{'noheaders'})
215 1 187 if (defined $args{'content_type'} and $args{'content_type'} eq '') { }
218 4 183 if ($args{'content_type'}) { }
225 2 186 if ($tt_vars->{'http_charset'})
230 8 180 if ($args{'http_status'})
308 359 373 unless $args{'metadata'}
320 373 359 if ($args{'metadata'}) { }
321 352 21 unless $metadata{'category'}
322 352 21 unless $metadata{'locale'}
348 87 57 $wiki->node_exists($name) ? :
361 44 41 $wiki->node_exists($name) ? :
368 373 359 $args{'metadata'} ? :
374 13 0 if ($website and $website ne 'http://' and is_web_uri($website))
378 6 7 if ($trunc_website =~ tr[/][] == 1)
381 2 11 if (length $trunc_website > $maxlen)
388 373 359 $args{'metadata'} ? :
391 373 359 $args{'metadata'} ? :
404 730 2 if ($config->enable_node_image)
407 1484 1436 $args{'metadata'} ? :
409 37 2883 if ($value)
413 36 2884 if $value
417 1 731 if (exists $metadata{'source'})
421 373 359 if ($args{'metadata'}) { }
429 343 30 if ($geo_handler == 1) { }
11 19 elsif ($geo_handler == 2) { }
480 233 126 if ($geo_handler == 1) { }
57 69 elsif ($geo_handler == 2) { }
69 0 elsif ($geo_handler == 3) { }
495 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) { }
509 80 1 if (defined $os_x and length $os_x and defined $os_y and length $os_y)
519 1 232 if ($args{'set_coord_field_vars'})
544 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) { }
557 56 0 if (defined $osie_x and length $osie_x and defined $osie_y and length $osie_y)
567 0 57 if ($args{'set_coord_field_vars'})
586 66 0 if (defined $lat and length $lat and defined $long and length $long)
604 0 69 if ($args{'set_coord_field_vars'})
622 6 726 if ($prefs{'latlong_traditional'})
624 8 4 unless defined $vars{$var} and length $vars{$var}
641 2 2 if ($degrees < 0) { }
0 2 elsif ($degrees == 0) { }
655 2 2 $isneg ? :