Branch Coverage

blib/lib/Graphics/ColorNames.pm
Criterion Covered Total %
branch 53 74 71.6


line true false branch
41 8 6 unless (&is_loaded($module))
43 0 8 unless &is_loaded($module)
53 0 11 $scheme =~ /^Color::Library::Dictionary::/ ? :
0 11 $scheme =~ /^\+/ ? :
59 0 11 if ($@)
63 11 0 if ($module->can('NamesRgbTable')) { }
0 0 elsif ($module->can('_load_color_list')) { }
83 11 2 if (@_) { }
85 3 12 if (ref $scheme) { }
9 3 elsif ($scheme =~ /^\+?(?:\w+[:][:])*\w+$/) { }
1 2 elsif (file_name_is_absolute($scheme)) { }
112 1402 5533 if ($key =~ /^(?:\x23|0x)?([0-9a-f]{6})$/) { }
125 5525 8 if (defined $val) { }
147 23 7485 unless (defined $key)
157 16 3 if (ref $scheme eq 'HASH') { }
0 3 elsif (ref $scheme eq 'CODE') { }
0 3 elsif (ref $scheme eq 'ARRAY') { }
174 0 0 unless exists $s->{$name}
175 0 0 if ($key =~ /^(.+\:.+)\.([0-9]+)$/)
185 0 0 if (ref $scheme eq 'GLOB' or ref $scheme eq 'IO::File' or $scheme->isa('IO::File') or ref $scheme eq 'FileHandle' or $scheme->isa('FileHandle'))
194 0 3 if ($@) { }
0 3 elsif ($!) { }
213 3 7 if (-d $path)
217 3 6 if (-r 'File::Spec'->catdir($path, $fn) and $fn =~ /(.+)\.pm$/)
266 1 0 unless (%FoundSchemes)
282 1 3 unless (ref $file)
283 0 1 unless (-r $file)
289 3 1 ref $file ? :
290 1 3 unless (ref $file)
291 0 1 unless open $fh, $file
300 24 16 if ($line ne '')
304 0 24 unless $name ne ''
323 1 3 unless (ref $file)
332 3 12 unless defined $rgb
334 10 2 unless defined $prefix
342 13 3 defined $rgb ? :
343 7 9 wantarray ? :