Branch Coverage

blib/lib/Module/Setup.pm
Criterion Covered Total %
branch 125 128 97.6


line true false branch
50 5 80 unless $self->{'_current_dir'} eq Cwd::getcwd()
65 1 16 unless @ARGV
81 1 16 unless &GetOptions('init', \$options->{'init'}, 'pack', \$options->{'pack'}, 'direct', \$options->{'direct'}, 'flavor|flavour=s', \$options->{'flavor'}, 'flavor-class|flavour-class=s', \$options->{'flavor_class'}, 'additional=s', \$options->{'additional'}, 'without-additional', \$options->{'without_additional'}, 'executable', \$options->{'executable'}, 'plugin=s@', \$options->{'plugins'}, 'target', \$options->{'target'}, 'module-setup-dir', \$options->{'module_setup_dir'}, 'devel', \$options->{'devel'}, 'test', \$options->{'test'}, 'version', \&Module::Setup::_setup_options_version, 'help', \&Module::Setup::_setup_options_pod2usage)
102 86 75 @{$self->argv;} ? :
103 77 84 if (not $self->options->{$name} and defined $default)
104 59 18 ref $default eq 'CODE' ? :
111 1 63 unless $self->options->{'module'}
117 1 62 unless $self->options->{'flavor'}
125 1 96 if ($self->options->{'direct'}) { }
130 1 96 unless $path
133 43 53 unless $self->base_dir->is_initialized
142 0 93 if $options->{'devel'}
146 29 52 if ($options->{'init'} or not $options->{'pack'} and $options->{'additional'})
155 1 61 if ($options->{'additional'} and not -d $self->base_dir->flavor->additional->path_to($options->{'additional'}))
159 11 50 if $options->{'pack'}
161 21 29 unless ($self->base_dir->flavor->is_dir)
162 1 18 unless $self->create_flavor
205 2 1 if ($local_plugin->package->isa('Module::Setup::Plugin'))
221 4 318 if (ref $plugin) { }
222 2 2 if (ref $plugin eq 'HASH') { }
231 310 10 unless $pkg =~ s/^\+//
233 318 2 unless ($loaded_local_plugin{$pkg})
235 1 317 if $@
245 58 752 if (-e $path) { }
247 46 12 unless $ans =~ /[Yy]/
253 1 763 if ($opts->{'is_binary'}) { }
264 418 346 if $opts->{'chmod'}
272 21 370 if (exists $tmpl->{'additional'})
278 367 24 if (exists $tmpl->{'file'} and $tmpl->{'file'}) { }
9 15 elsif (exists $tmpl->{'dir'} and $tmpl->{'dir'}) { }
3 12 elsif (exists $tmpl->{'plugin'} and $tmpl->{'plugin'} and not exists $tmpl->{'additional'}) { }
296 33 17 unless $class =~ s/^\+//
297 1 49 if $@
309 1 48 if $self->base_dir->flavor->is_exists and not exists $options->{'additional'}
311 2 46 unless $flavor->setup_flavor($self)
316 5 41 if ($options->{'additional'})
320 36 391 if (exists $tmpl->{'config'} and ref $tmpl->{'config'} eq 'HASH') { }
324 6 385 if (exists $tmpl->{'additional'}) { }
15 370 elsif ($options->{'additional'}) { }
329 21 370 if $additional
330 21 370 if ($additional)
343 5 41 if ($options->{'additional'})
351 6 2 if (exists $options->{'plugins'} and $options->{'plugins'} and @{$options->{'plugins'};})
410 5 96 $file->is_dir ? :
413 5 96 if ($file->is_dir) { }
423 1 95 if (-B $type->path_to($file))
439 0 11 exists $config->{'flavor_dir'} ? :
446 10 1 unless ($config->{'without_additional'})
447 2 8 if $config->{'additional'}
449 13 6 unless $additional->is_dir
451 2 4 if $config->{'additional'} and $name ne $config->{'additional'}
456 2 2 if ($config->{'additional'}) { }
465 0 11 if ($config->{'executable'})
513 1 54 if $self->options->{'direct'}
514 19 35 if $self->base_dir->flavors->path->children == 0
518 1 37 unless $flavor->is_dir
520 35 2 $name eq 'default' ? :
522 34 1 if @flavors == 1
533 3 2 unless $ret =~ /^[0-9]+$/
542 1 1 if $HAS_TERM
546 1 1214 if $HAS_TERM
550 80 4 unless $HAS_TERM
553 2 7 unless $validator_callback and ref $validator_callback eq 'CODE'
554 2 5 if &$validator_callback($self, $ret)