Branch Coverage

blib/lib/Amon2/Plugin/CLI.pm
Criterion Covered Total %
branch 9 14 64.2


line true false branch
13 0 5 if ($code_conf->{'cli_opt_key'})
27 2 3 if (ref $arg eq 'CODE') { }
37 1 4 if (my $e = $@)
38 0 1 if ($code_conf->{'on_error'}) { }
69 0 1 unless Getopt::Long::GetOptionsFromArray(\@cli_args, %options, 'h', sub { $c->show_usage(-'exitval', 1); } , 'help', sub { $c->show_usage(-'exitval', 1, -'verbose', 2); } )
77 0 1 unless ref $opt eq 'HASH'
87 0 1 if (not defined $opt_key or $opt_key eq '')