Branch Coverage

blib/lib/Module/CGI/Install.pm
Criterion Covered Total %
branch 58 136 42.6


line true false branch
95 0 4 unless (defined $self->install_cgi)
98 0 4 unless (defined $self->install_static)
101 4 0 unless (defined $self->install_config)
106 0 4 unless (defined $self->interactive)
118 2 2 unless ($self->install_cgi)
122 2 2 unless ($self->install_static)
126 4 0 unless ($self->install_config)
138 1 0 if ($self->install_cgi)
140 0 1 if ($self->interactive and not defined $self->cgi_dir)
147 0 1 unless (defined $cgi_dir)
150 0 1 unless (-d $cgi_dir)
153 0 1 unless (-w $cgi_dir)
158 0 1 if ($self->interactive and not defined $self->cgi_uri)
163 0 1 unless (defined _STRING($self->cgi_uri))
168 0 1 unless ($self->force or $self->validate_cgi_dir($self->cgi_map))
174 0 1 if ($self->install_config)
176 0 0 if ($self->interactive and not defined $self->config_dir)
177 0 0 $self->install_cgi ? :
186 0 0 unless (defined $config_dir)
189 0 0 unless (-d $config_dir)
192 0 0 unless (-w $config_dir)
199 1 0 if ($self->install_static)
201 0 1 if ($self->interactive and not defined $self->static_dir)
208 0 1 unless (defined $static_dir)
211 0 1 unless (-d $static_dir)
214 0 1 unless (-w $static_dir)
219 0 1 if ($self->interactive and not defined $self->static_uri)
224 0 1 unless (defined _STRING($self->static_uri))
229 0 1 unless ($self->force or $self->validate_static_dir($self->static_map))
243 0 1 unless ($from and -f $from)
248 0 1 unless (-f $to)
251 0 1 unless (&File::chmod::chmod('a+rx', $to))
265 0 1 unless (-d $dirname)
269 0 1 unless (-f $to)
281 0 0 if (_INSTANCE $from, 'YAML::Tiny' or _INSTANCE $from, 'Config::Tiny')
286 0 0 unless ($from->write($to))
303 1 14 unless $_[0]->install_cgi
308 1 6 unless $_[0]->install_static
321 0 1 unless my $class = _CLASS(shift())
322 0 1 unless my $script = _STRING(shift())
324 0 1 unless ($path and -f $path)
333 0 1 unless my $class = _CLASS(shift())
334 0 1 unless $self->_module_exists($class)
342 0 0 unless my $name = _STRING(shift())
343 0 0 if (_CLASSISA($config, 'Config::Tiny'))
346 0 0 if (_CLASSISA($config, 'YAML::Tiny'))
349 0 0 unless (_INSTANCE $config, 'Config::Tiny' or _INSTANCE $config, 'Config::YAML')
369 0 2 unless my $dir = _INSTANCE(shift(), 'URI::ToDisk')
374 0 2 unless (File::Copy::copy($Module::CGI::Install::CGICAPTURE, $file->path))
378 0 2 unless (&File::chmod::chmod('a+rx', $file->path))
390 0 2 unless (defined $www)
394 0 2 if ($www =~ m[^\#\!/usr/bin/perl])
398 0 2 unless ($www =~ /^---\nARGV\:/)
405 0 2 unless (_INSTANCE $self->cgi_capture, 'CGI::Capture')
415 0 2 unless my $dir = _INSTANCE(shift(), 'URI::ToDisk')
421 0 2 unless open FILE, '>' . $file->path
422 0 2 unless print FILE $test_string
423 0 2 unless close FILE
432 0 2 unless (defined $www)
438 0 2 unless ($www eq $test_string)
472 0 0 unless -t $out_handle
475 0 0 if (&Scalar::Util::openhandle(*ARGV))
477 0 0 if defined $ARGV and $ARGV eq '-'
480 0 0 if eof ARGV
519 6 6 unless -f $path
523 0 6 unless ($packlist)
529 0 6 if @script > 1
530 0 6 unless @script