Branch Coverage

blib/lib/App/clad.pm
Criterion Covered Total %
branch 73 102 71.5


line true false branch
26 3 76 eval { do { require Clustericious::Admin::ConfigData } } ? :
44 0 1 unless $dir
105 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(_rc(), '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); } )
107 3 68 if $self->log_dir
111 20 51 if $self->server
112 1 50 if $self->purge
113 1 49 if $self->list
117 1 48 unless (@argv)
129 1 47 if $argv[0] =~ /^--?(.*)$/
136 1 46 unless @argv
138 1 45 if $argv[0] =~ /^--?(.*)$/
143 2 43 if (my $expanded = $self->alias->{$self->command->[0]})
145 1 1 if (ref $expanded) { }
155 1 44 if ($self->config->script('default', {})->{$self->command->[0]})
168 2 44 unless ($self->cluster_list->{$cluster})
176 5 1 if -r $file
181 1 44 if (defined $self->dir and not -d $self->dir)
187 45 0 unless (-t STDIN)
192 45 0 unless defined $self->{'stdin'} and length $self->{'stdin'}
195 2 43 unless $ok
226 44 0 unless $self->{'fat'}
232 0 32 $self->fat ? :
242 0 16 if %deprecated
253 0 0 if %deprecated
262 5 12 if defined $new
270 9 32 unless ($self->{'host_length'})
276 2 8 $cluster =~ s/^(.*)@// ? :
279 9 19 $user ? :
280 9 19 if length $prefix > $length
312 1 11 if ($self->files)
329 1 11 if ($self->script)
342 1 11 if ($self->dir)
354 3 4 if ($child->is_dir) { }
374 0 12 if ($self->stdin)
384 0 12 if ($self->fat) { }
409 17 11 if $self->server
410 0 11 if $self->purge
411 0 11 if $self->list
419 2 10 $cluster =~ s/^(.*)@// ? :
425 9 21 $user ? :
426 0 30 if ($self->dry_run) { }
444 0 0 if $self->{'cv'}
445 0 30 if $max
447 0 30 if ($max)
450 0 0 if ($count >= $max)
458 0 30 $self->serial ? :
465 1 10 if $self->log_dir
483 0 0 unless -d $log_dir
487 0 0 if (-d $path) { }
507 0 0 if ($cluster) { }
519 0 0 if ($alias) { }