Branch Coverage

blib/lib/App/clad.pm
Criterion Covered Total %
branch 72 100 72.0


line true false branch
25 3 76 eval { do { require Clustericious::Admin::ConfigData } } ? :
97 0 71 unless &GetOptionsFromArray(\@argv, 'n', \$self->{'dry_run'}, 'a', sub { $self->{'color'} = 0; } , 'l=s', \$self->{'user'}, 'server', \$self->{'server'}, 'verbose', \$self->{'verbose'}, 'serial', \$self->{'serial'}, 'config=s', \$config_name, 'fat', \$self->{'fat'}, 'max=s', \$self->{'max'}, 'file=s', $self->{'files'}, 'dir=s', \$self->{'dir'}, 'summary', \$self->{'summary'}, 'purge', \$self->{'purge'}, 'list', \$self->{'list'}, 'log', sub { $self->{'log_dir'} = 'Path::Class::Dir'->new('File::HomeDir'->my_dist_data('Clustericious-Admin', {'create', 1}), 'log', sprintf('%08x.%s', time, $$)); } , 'log-dir=s', sub { $self->{'log_dir'} = 'Path::Class::Dir'->new($_[1]); } , 'help|h', sub { pod2usage({-'verbose', 2}); } , 'version', sub { say STDERR 'App::clad version ', $VERSION // 'dev'; &CORE::GLOBAL::exit(1); } )
99 3 68 if $self->log_dir
103 20 51 if $self->server
104 1 50 if $self->purge
105 1 49 if $self->list
109 1 48 unless (@argv)
121 1 47 if $argv[0] =~ /^--?(.*)$/
128 1 46 unless @argv
130 1 45 if $argv[0] =~ /^--?(.*)$/
135 2 43 if (my $expanded = $self->alias->{$self->command->[0]})
137 1 1 if (ref $expanded) { }
147 1 44 if ($self->config->script('default', {})->{$self->command->[0]})
160 2 44 unless ($self->cluster_list->{$cluster})
168 5 1 if -r $file
173 1 44 if (defined $self->dir and not -d $self->dir)
179 45 0 unless (-t STDIN)
184 45 0 unless defined $self->{'stdin'} and length $self->{'stdin'}
187 2 43 unless $ok
218 44 0 unless $self->{'fat'}
224 0 32 $self->fat ? :
234 0 16 if %deprecated
245 0 0 if %deprecated
254 5 12 if defined $new
262 9 32 unless ($self->{'host_length'})
268 2 8 $cluster =~ s/^(.*)@// ? :
271 9 19 $user ? :
272 9 19 if length $prefix > $length
304 1 11 if ($self->files)
321 1 11 if ($self->script)
334 1 11 if ($self->dir)
346 3 4 if ($child->is_dir) { }
366 0 12 if ($self->stdin)
376 0 12 if ($self->fat) { }
401 17 11 if $self->server
402 0 11 if $self->purge
403 0 11 if $self->list
411 2 10 $cluster =~ s/^(.*)@// ? :
417 9 21 $user ? :
418 0 30 if ($self->dry_run) { }
436 0 0 if $self->{'cv'}
437 0 30 if $max
439 0 30 if ($max)
442 0 0 if ($count >= $max)
450 0 30 $self->serial ? :
457 1 10 if $self->log_dir
475 0 0 unless -d $log_dir
479 0 0 if (-d $path) { }
499 0 0 if ($cluster) { }
511 0 0 if ($alias) { }