Branch Coverage

blib/lib/Perl/ToPerl6/Document.pm
Criterion Covered Total %
branch 48 108 44.4


line true false branch
32 0 154 if $function_name eq 'DESTROY'
83 0 50 if (@_ == 1) { }
99 33 0 ref $source_code ? :
17 33 _is_ppi_doc($source_code) ? :
107 0 50 unless (defined $ppi_document)
109 0 0 ref $source_code ? :
153 2 80 if (ref $wanted or not $wanted or not $wanted =~ / \A PPI:: /msx)
161 18 62 unless ($self->{'_elements_of'})
187 10 1 if (ref $wanted or not $wanted or not $wanted =~ / \A PPI:: /msx)
192 1 0 $result ? :
202 2 1 if (ref $wanted or not $wanted or not $wanted =~ / \A PPI:: /msx)
207 1 0 $result ? :
225 0 0 $subdocuments ? :
233 0 0 if (&blessed($element) and $element->isa('PPI::Element')) { }
236 0 0 if exists $self->{'_ppix_regexp_from_element'}{$addr}
251 0 0 unless $self->find('PPI::Statement::Include')
253 0 0 unless 're' eq $use_re->module
255 0 0 unless $self->element_is_in_lexical_scope_after_statement_containing($elem, $use_re)
258 0 0 'no' eq $use_re->type ? :
263 0 0 $_->isa('PPI::Token::QuoteLike::Words') ? :
0 0 $_->isa('PPI::Token::Quote') ? :
282 0 0 if $outer_elem->scope
291 0 0 unless my $stmt = $outer_elem->statement
293 0 0 unless my $last_elem = $stmt->last_element
296 0 0 unless my $stmt_loc = $last_elem->location
299 0 0 unless my $inner_loc = $inner_elem->location
302 0 0 if $stmt_loc->[0] > $inner_loc->[0]
304 0 0 if $stmt_loc->[0] == $inner_loc->[0] and $stmt_loc->[1] > $inner_loc->[1]
314 0 0 unless $parent = $parent->parent
330 2 49 if (defined $self->{'_filename_override'}) { }
335 0 49 $doc->can('filename') ? :
347 6 0 unless (exists $self->{'_highest_explicit_perl_version'})
350 5 1 if ($includes) { }
367 2 2 $a >= $b ? :
379 5 1 if $highest_explicit_perl_version
412 0 19 if $transformer_name eq 'Perl::ToPerl6::Transformer::Miscellanea::ProhibitUnrestrictedNoCritic'
415 0 19 unless $line
416 0 19 if $self->{'_disabled_line_map'}{$line}{$transformer_name}
417 0 19 if $self->{'_disabled_line_map'}{$line}{'ALL'}
430 0 0 $annotation->disables_all_transformers ? :
489 45 9 unless $element->isa('PPI::Statement::Include')
490 9 0 if $element->version
509 102 121 unless ($classes)
546 0 48 if ($first_stmnt =~ /$fixin_rx/ms)
561 0 50 if (defined $file_name and ref $args->{'-program-extensions'} eq 'ARRAY')
566 0 0 ref $ext eq 'Regexp' ? :
571 0 0 if $file_name =~ /$regex/msx
575 1 49 if shebang_line($self)
576 1 48 if defined $file_name and $file_name =~ / [.] PL \z /msx
588 0 2 if $nodes
591 0 2 unless ($ppi_document)
617 1 2 if $mapping
620 1 1 unless ($includes)
626 0 1 unless $_->module