Branch Coverage

blib/lib/Perl/Critic/Policy/InputOutput/RequireBriefOpen.pm
Criterion Covered Total %
branch 1 84 1.1


line true false branch
71 346 0 unless $OPEN_BUILTIN{$elem->content}
72 0 0 unless is_function_call($elem)
74 0 0 if 2 > @open_args
77 0 0 unless $fh
78 0 0 if $fh =~ / \A [*]? STD (?: IN|OUT|ERR ) \z /msx
84 0 0 if (is_function_call($close_token)) { }
0 0 elsif ($is_lexical and is_method_call($close_token)) { }
88 0 0 if ("ARRAY" eq ref $close_parameter)
91 0 0 if ($close_parameter)
93 0 0 if $fh eq $close_parameter
95 0 0 if (&any(sub {
100 0 0 if $stripped_fh eq $stripped_parameter
106 0 0 if $fh eq $tok
117 0 0 unless $parent
121 0 0 $self->{'_lines'} ? :
126 0 0 if $candidate->isa("PPI::Statement::Sub")
128 0 0 unless defined $candidate_loc->[0]
129 0 0 if $candidate_loc->[0] < $open_loc->[0]
130 0 0 if $candidate_loc->[0] == $open_loc->[0] and $candidate_loc->[1] <= $open_loc->[1]
131 0 0 if defined $end_line and $candidate_loc->[0] > $end_line
132 0 0 unless $candidate->isa("PPI::Token::Word")
135 0 0 unless $closes
144 0 0 $self->{'_lines'} && defined $open_loc->[0] ? :
148 0 0 unless $elem->scope
152 0 0 if $LOCAL_LEXICAL == $is_lexical
153 0 0 unless defined $end_line
160 0 0 unless $open_loc
161 0 0 unless $elem->location
163 0 0 unless my $last_kid = $elem->child($LAST_ELEMENT)
165 0 0 unless my $last_kid_loc = $last_kid->location
171 0 0 if $last_kid_loc->[0] > $end_line
182 0 0 if (2 == @{$tokens;}) { }
0 0 elsif (1 == @{$tokens;}) { }
183 0 0 if ("my" eq $tokens->[0] and $tokens->[1]->isa("PPI::Token::Symbol") and $SCALAR_SIGIL eq $tokens->[1]->raw_type)
193 0 0 if ($argument->isa('PPI::Token::Symbol')) { }
0 0 elsif ($argument->isa('PPI::Token::Word') and $argument eq uc $argument) { }
195 0 0 if ($SCALAR_SIGIL eq $sigil) { }
0 0 elsif ($GLOB_SIGIL eq $sigil) { }
219 0 0 unless $element->isa("PPI::Structure::Block")
222 0 0 if 1 != @children
225 0 0 unless $child->isa("PPI::Statement")
228 0 0 if 1 != @grandchildren