Branch Coverage

blib/lib/App/perlimports/CLI.pm
Criterion Covered Total %
branch 33 70 47.1


line true false branch
244 1 0 if (not $self->_opts->no_config_file and $self->_config_file)
252 5 8 unless $ref
254 5 3 if ($ref eq "JSON::PP::Boolean" or $ref eq "Types::Serializer::Boolean")
256 2 3 $$maybe_bool ? :
281 0 3 if (defined $val)
291 0 1 if ($self->_opts->config_file)
292 0 0 unless (-e $self->_opts->config_file)
301 1 0 if -e $name
308 0 0 -e $file ? :
324 0 1 if $opts->version
325 0 1 if $opts->help
327 0 1 if ($opts->verbose_help)
342 0 1 if ($opts->create_config_file)
359 0 1 if ($self->_read_stdin)
363 0 0 if ($opts->range_begin and $opts->range_end) { }
368 0 0 if ($end > scalar @lines + 1)
381 0 1 $self->_config->log_filename ? :
0 1 $self->_has_logger ? :
405 0 1 if ($self->_json and not $self->_lint)
410 0 1 if ($self->_lint and $self->_inplace_edit)
415 0 1 if ($opts->range_begin and not $opts->range_end or $opts->range_end and not $opts->range_begin)
421 0 1 if ($opts->range_begin and not $self->_read_stdin)
427 1 0 $opts->filename ? :
0 1 $tmp_file ? :
432 0 1 unless (@files)
446 0 1 @{$self->_config->ignore;} ? :
1 0 @{$self->_config->ignore_pattern;} ? :
0 1 @{$self->_config->never_export;} ? :
0 1 $selection ? :
462 0 1 unless (path($filename)->is_file)
479 0 1 if ($self->_lint)
485 0 0 if ($linter_success) { }
500 0 1 if ($self->_read_stdin) { }
0 1 elsif ($self->_inplace_edit) { }
528 0 1 if (-d $path) { }