Branch Coverage

blib/lib/Game/TextMapper/Mapper.pm
Criterion Covered Total %
branch 70 120 58.3


line true false branch
136 2631 1372 if (/^(-?\d\d)(-?\d\d)(\d\d)?\s+(.*)/u or /^(-?\d\d+)\.(-?\d\d+)(?:\.(\d\d+))?\s+(.*)/u) { }
341 1031 elsif (/^(-?\d\d-?\d\d(?:\d\d)?(?:--?\d\d-?\d\d(?:\d\d)?)+)\s+(\S+)\s*(?:["\x{201c}](.+)["\x{201d}])?\s*(left|right)?\s*(\d+%)?/u or /^(-?\d\d+\.-?\d\d+(?:\.\d\d+)?(?:--?\d\d+\.-?\d\d+(?:\.\d\d+)?)+)\s+(\S+)\s*(?:["\x{201c}](.+)["\x{201d}])?\s*(left|right)?\s*(\d+%)?/u) { }
0 1031 elsif (my($name, $x, $y, $uwp, $starport, $size, $atmosphere, $hydrographic, $population, $government, $law, $tech, $bases, $rest) = /(?:([^>\r\n\t]*?)\s+)?(\d\d)(\d\d)\s+(([A-EX])([\dA])([\dA-F])([\dA])([\dA-C])([\dA-F])([\dA-L])-(\d{1,2}|[\dA-HJ-NP-Z]))(?:\s+([PCTRNSG ]+)\b)?(.*)/u) { }
141 890 elsif (/^(\S+)\s+attributes\s+(.*)/u) { }
0 890 elsif (/^(\S+)\s+lib\s+(.*)/u) { }
26 864 elsif (/^(\S+)\s+xml\s+(.*)/u) { }
448 416 elsif (/^(<.*>)/u) { }
37 379 elsif (/^(\S+)\s+path\s+attributes\s+(.*)/u) { }
15 364 elsif (/^(\S+)\s+path\s+(.*)/u) { }
8 356 elsif (/^text\s+(.*)/u) { }
7 349 elsif (/^glow\s+(.*)/u) { }
8 341 elsif (/^label\s+(.*)/u) { }
5 336 elsif (/^license\s+(.*)/u) { }
8 328 elsif (/^other\s+(.*)/u) { }
1 327 elsif (/^url\s+(\S+)/u) { }
8 319 elsif (/^include\s+(\S*)/u) { }
141 38 38 if ($tag eq 'name') { }
143 0 38 if $size
151 0 6 if ($transform or $region->label) { }
196 0 0 if $bases =~ /C/u
197 0 0 if $bases =~ /T/u
198 0 0 if $bases =~ /P/u
199 0 0 if $bases =~ /R/u
200 0 0 if $bases =~ /N/u
201 0 0 if $bases =~ /G/u
202 0 0 if $bases =~ /S/u
206 0 0 if $travelzone
236 0 8 if (scalar keys %{$self->seen;} > 5) { }
8 0 elsif (not $self->seen->{$1}) { }
243 8 0 if (index($location, '/') == -1 and -f ($path = 'Mojo::File'->new($self->dist_dir, $location))) { }
0 0 elsif ($self->local_files and -f ($path = 'Mojo::File'->new($location))) { }
0 0 elsif ($location =~ /^https?:/u) { }
0 0 elsif ($self->dist_dir =~ /^https?:/u) { }
256 0 0 if ($response->is_success) { }
263 0 0 unless $url =~ m[/$]u
268 0 0 if ($response->is_success) { }
279 0 319 if $_ and not /^\s*#/u
289 38 8 if (ref $other eq 'CODE') { }
306 0 0 if ($size and not $attributes =~ s/\bfont-size="\d+pt"/font-size="$size"/u)
312 0 0 if $url
324 38 0 if $self->label_attributes
325 0 38 if ($size and not $attributes =~ s/\bfont-size="\d+pt"/font-size="$size"/u)
342 63 633 if ($attr)
358 0 10 unless @{$self->regions;}
361 0 2631 if $region->z > $maxz
377 0 2631 unless $region->z == $z
378 10 2621 unless defined $minx and $minx <= $region->x
379 209 2422 unless defined $maxx and $maxx >= $region->x
380 10 2621 unless defined $miny and $miny <= $region->y
381 101 2530 unless defined $maxy and $maxy >= $region->y
383 10 0 unless defined $min_x_overall and $minx >= $min_x_overall
384 10 0 unless defined $min_y_overall and $maxx <= $max_x_overall
385 10 0 unless defined $min_y_overall
386 10 0 unless defined $max_y_overall
387 0 10 if $z > 0
401 7 3 if @{$self->defs;}
419 46 186 if ($path or $attributes) { }
422 3 43 if ($path and not $attributes)
426 43 3 if ($attributes)
430 8 38 if ($path)