Branch Coverage

blib/lib/Clustericious/Client/Command.pm
Criterion Covered Total %
branch 23 86 26.7


line true false branch
26 0 0 if $msg
29 0 0 if $routes and @$routes
32 0 0 if $objects and @$objects
60 0 0 unless $pattern =~ /^(\S+):(.*)$/
62 0 0 unless $file =~ /[*?]/
66 0 0 if $?
75 0 0 unless ($filename =~ /^(\S+):(.*)$/)
77 0 0 unless my $parsed = LoadFile($filename)
85 0 0 if ($?)
88 0 0 unless (my $parsed = Load($content))
98 6 0 @_ ? :
101 0 6 if not $args[0] or $args[0] =~ /help/
108 0 6 if (/--remote/)
118 0 6 unless my $method = $arg
122 0 6 if ($method eq 'create')
123 0 0 unless $method = shift @args
127 0 6 if ($method =~ /^(delete|search)$/)
131 0 6 unless ($client->can($method))
141 5 1 if ($meta->get('args'))
146 0 3 if $client->has_error
149 0 3 if (blessed $obj and $obj->isa('Mojo::Transaction')) { }
0 3 elsif (ref $obj eq 'HASH' and keys %$obj == 1 and $$obj{'text'}) { }
0 3 elsif ($client->tx and $client->tx->req->method eq 'POST' and $meta->get('quiet_post')) { }
150 0 0 if (my $res = $obj->success) { }
154 0 0 if $code
162 0 0 if ($got and ref $got eq 'HASH' and (keys %$got == 1 and $$got{'text'}))
167 0 3 unless $TESTING
178 0 1 if (not $meta->get('dont_read_files') and @args > 0 and -r $_[-1] || $_[-1] =~ /^\S+:/) { }
0 1 elsif ($try_stdin and -r STDIN and @args == 0) { }
182 0 0 if ($arg =~ /^\S+:/) { }
0 0 elsif (-e $arg) { }
193 0 0 unless $content
200 0 1 if ($have_filenames) { }
205 0 1 if $client->errorstring
206 0 1 unless $obj
208 0 1 if (blessed $obj and $obj->isa('Mojo::Transaction')) { }
0 1 elsif (ref $obj eq 'HASH' and keys %$obj == 1 and $$obj{'text'}) { }
0 1 elsif ($client->tx and $client->tx->req->method eq 'POST' and $meta->get('quiet_post')) { }
209 0 0 if (my $res = $obj->success) { }
213 0 0 if $code
221 0 0 if ($got and ref $got eq 'HASH' and (keys %$got == 1 and $$got{'text'}))
226 0 1 unless $TESTING
234 0 0 if ref $_ eq 'DateTime'