Branch Coverage

blib/lib/PPIx/Grep.pm
Criterion Covered Total %
branch 5 88 5.6


line true false branch
97 0 0 if (_handle_info_requests(\%options))
101 0 0 if (@argv < 2)
107 0 0 unless my(@ppi_classes) = _derive_ppi_classes($pattern)
114 0 0 if not _is_ignored_file($_)
132 0 0 if (not defined $found_something) { }
0 0 elsif ($EXIT_CODE_ERROR != $return_code and $found_something) { }
139 0 0 if ($file_error)
152 7 0 if (&Getopt::Long::GetOptionsFromArray($argv, \%values, @OPTIONS))
153 0 7 unless _set_options(\%values)
165 0 0 if ($$options{'help'})
171 0 0 if ($$options{'version'})
218 0 0 unless ($ppi_class)
228 0 0 unless (@ppi_classes)
244 0 0 if (1 == @{$ppi_classes;})
248 0 0 if (my $match = _get_match())
249 0 0 if ($ppi_class)
253 0 0 unless $element->isa($ppi_class)
254 0 0 if $element->content =~ /$match/
262 0 0 if none sub { $element->isa($_); } , @{$ppi_classes;}
263 0 0 if $element->content =~ /$match/
268 0 0 if $ppi_class
273 0 0 if any sub { $element->isa($_); } , @{$ppi_classes;}
282 0 0 unless my $document = _create_document($source, $source_description)
287 0 0 if ($elements)
291 0 0 if ($location) { }
311 0 0 unless (-e $source)
316 0 0 unless (-r $source)
321 0 0 if (-d $source)
326 0 0 if (-z $source)
332 0 0 unless ($document)
345 0 7 if ($match)
349 0 0 unless (eval { do { $compiled_match = qr/$match/; 1 } })
350 0 0 if ($PPIx::Grep::EVAL_ERROR)
368 3 4 if ($format)
455 0 0 unless eval { do { $value = $element->$method_name; 1 } }
457 0 0 unless (defined $value)
479 0 0 if $ignored_directories{$directory}
486 0 0 if $file =~ qr/ (?: [.] bak | ~ ) \z /msx
487 0 0 if $file =~ qr/ [#] .+ [#] \z /msx
488 0 0 if $file =~ qr/ [._] .* \.swp \z /msx
495 0 0 if $file =~ / [.] (?: p (?: l x? | m ) | t | PL ) \z /msx
496 0 0 if index($file, '.') >= 0
503 0 0 if (open my $handle, '<', $file)
506 0 0 unless (close $handle)