Branch Coverage

blib/lib/PPIx/EditorTools/IntroduceTemporaryVariable.pm
Criterion Covered Total %
branch 20 26 76.9


line true false branch
22 0 4 unless my $start_loc = $args{'start_location'}
23 0 4 unless my $end_loc = $args{'end_location'}
25 1 3 unless defined $varname
26 1 3 unless $varname =~ /^[\$\@\%]/
33 0 4 unless $token
36 0 4 unless $statement
46 0 6 unless defined $parent
47 6 0 if ($parent eq $statement)
50 1 5 if not $parent or $parent->isa('PPI::Structure::Block') or $parent->isa('PPI::Structure::Document')
55 3 2 unless $parent and $parent->isa('PPI::Statement')
69 4 1 if $line_num == $end_loc->[0]
70 4 1 if $line_num == $start_loc->[0]
79 3 1 if $code[$location_for_insert->[0] - 1] =~ /^(\s+)/