Branch Coverage

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


line true false branch
48 5 84 unless $$self{'_current_dir'} eq Cwd::getcwd()
63 1 16 unless @ARGV
66 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', \&_setup_options_version, 'help', \&_setup_options_pod2usage
100 92 82 @{$self->argv;} ? :
101 84 90 if (not $self->options->{$name} and defined $default)
102 65 19 ref $default eq 'CODE' ? :
109 1 69 unless $self->options->{'module'}
115 1 68 unless $self->options->{'flavor'}
123 4 100 if ($self->options->{'direct'}) { }
128 1 103 unless $path
131 49 54 unless $self->base_dir->is_initialized
140 0 100 if $$options{'devel'}
144 30 70 if ($$options{'init'} or not $$options{'pack'} and $$options{'additional'})
153 1 67 if ($$options{'additional'} and not -d $self->base_dir->flavor->additional->path_to($$options{'additional'}))
157 11 56 if $$options{'pack'}
159 26 30 unless ($self->base_dir->flavor->is_dir)
160 1 23 unless $self->create_flavor
203 2 1 if ($local_plugin->package->isa('Module::Setup::Plugin'))
219 4 359 if (ref $plugin) { }
220 2 2 if (ref $plugin eq 'HASH') { }
229 351 10 unless $pkg =~ s/^\+//
231 359 2 unless ($loaded_local_plugin{$pkg})
233 1 358 if $@
243 58 825 if (-e $path) { }
245 46 12 unless $ans =~ /[Yy]/
251 1 836 if ($$opts{'is_binary'}) { }
262 457 380 if $$opts{'chmod'}
270 21 406 if (exists $$tmpl{'additional'})
276 403 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'}) { }
294 36 20 unless $class =~ s/^\+//
295 1 55 if $@
307 1 54 if $self->base_dir->flavor->is_exists and not exists $$options{'additional'}
309 2 52 unless $flavor->setup_flavor($self)
314 5 47 if ($$options{'additional'})
318 39 427 if (exists $$tmpl{'config'} and ref $$tmpl{'config'} eq 'HASH') { }
322 6 421 if (exists $$tmpl{'additional'}) { }
15 406 elsif ($$options{'additional'}) { }
327 21 406 if $additional
328 21 406 if ($additional)
341 5 47 if ($$options{'additional'})
349 9 2 if (exists $$options{'plugins'} and $$options{'plugins'} and @{$$options{'plugins'};})
409 5 96 $file->is_dir ? :
412 5 96 if ($file->is_dir) { }
422 1 95 if (-B $type->path_to($file))
438 0 11 exists $$config{'flavor_dir'} ? :
445 10 1 unless ($$config{'without_additional'})
446 2 8 if $$config{'additional'}
448 13 6 unless $additional->is_dir
450 2 4 if $$config{'additional'} and $name ne $$config{'additional'}
455 2 2 if ($$config{'additional'}) { }
464 0 11 if ($$config{'executable'})
512 4 57 if $self->options->{'direct'}
513 21 36 if $self->base_dir->flavors->path->children == 0
517 1 38 unless $flavor->is_dir
519 36 2 $name eq 'default' ? :
521 35 1 if @flavors == 1
532 3 2 unless $ret =~ /^[0-9]+$/
541 1 1 if $HAS_TERM
545 1 1344 if $HAS_TERM
549 85 4 unless $HAS_TERM
552 2 7 unless $validator_callback and ref $validator_callback eq 'CODE'
553 2 5 if &$validator_callback($self, $ret)