| line |
true |
false |
branch |
|
257
|
1 |
6 |
defined $args->{'prompt'} ? : |
|
272
|
1 |
15 |
unless exists $args->{'name'} and defined $args->{'name'} |
|
273
|
1 |
14 |
unless exists $args->{'cmd_schema'} and defined $args->{'cmd_schema'} |
|
276
|
1 |
13 |
unless ref $args->{'cmd_schema'} eq "HASH" |
|
282
|
1 |
13 |
unless defined $schema->{'exec'} |
|
284
|
1 |
12 |
unless ref $schema->{'exec'} eq "CODE" |
|
287
|
4 |
8 |
if (exists $schema->{'args'} and defined $schema->{'args'}) |
|
288
|
1 |
3 |
unless ref $schema->{'args'} |
|
290
|
1 |
2 |
if scalar @{$schema->{'args'};} < 1 |
|
293
|
1 |
1 |
unless ref $arg eq "HASH" |
|
299
|
2 |
6 |
if (exists $args->{'get_opts'} and defined $args->{'get_opts'}) |
|
300
|
1 |
1 |
unless ref $args->{'get_opts'} eq "CODE" |
|
310
|
0 |
0 |
if defined $self->{'hist_file'} |
|
324
|
0 |
0 |
if $input =~ /^(exit|quit)$/ |
|
326
|
0 |
0 |
unless $input |
|
328
|
0 |
0 |
if ($input =~ /help/) |
|
336
|
0 |
0 |
if ($self->{'passthrough'} and @args and $args[0] =~ /^\!/) |
|
342
|
0 |
0 |
if (defined $self->{'get_opts'}) |
|
355
|
0 |
0 |
if (defined $self->{'custom_logic'}) |
|
360
|
0 |
0 |
if (defined $result and ref $result eq "HASH") |
|
361
|
0 |
0 |
if (defined $result->{'action'}) |
|
362
|
0 |
0 |
if $result->{'action'} eq "next" |
|
363
|
0 |
0 |
if $result->{'action'} eq "last" |
|
365
|
0 |
0 |
if (defined $result->{'schema'}) |
|
373
|
0 |
0 |
if (exists $self->{'cmd_schema'}{$cmd}) { } |
|
380
|
0 |
0 |
if defined $self->{'hist_file'} |
|
387
|
1 |
4 |
if $line =~ /^\!/ |
|
392
|
3 |
1 |
unless $line =~ /\s$/ |
|
394
|
4 |
0 |
if (@words >= 1) |
|
398
|
2 |
2 |
if ($self->{'cmd_schema'}{$cmd}) |
|
402
|
0 |
2 |
unless $schema->{'args'} |
|
407
|
0 |
2 |
if (scalar @complete_words and exists $schema->{'args'}[$opt_arg_index]{$complete_words[-1]}) |
|
409
|
0 |
0 |
if defined $opt_arg |
|
418
|
4 |
2 |
if defined $value |
|
423
|
0 |
4 |
if $word eq $opt_arg |
|
430
|
0 |
2 |
unless @keys |
|
436
|
2 |
0 |
if (@words <= 1) |
|
453
|
0 |
0 |
unless $self->{'cmd_schema'}{$cmd}{'args'} |
|
459
|
0 |
0 |
defined $opt ? : |
|
472
|
0 |
0 |
if (-f $self->{'hist_file'}) |
|
473
|
0 |
0 |
unless open my $fh, "<", $self->{'hist_file'} |
|
487
|
0 |
0 |
unless open my $fh, ">>", $self->{'hist_file'} |
|
488
|
0 |
0 |
if ($term->ReadLine =~ /Gnu/) |