Branch Coverage

blib/lib/CLI/Osprey/Role.pm
Criterion Covered Total %
branch 46 104 44.2


line true false branch
18 0 4 if $attributes{'repeatable'} and not defined $attributes{'format'}
19 0 4 if $attributes{'negatable'}
20 4 0 if defined $attributes{'format'}
21 0 4 if $attributes{'repeatable'} and defined $attributes{'format'}
34 0 0 $config->{'added_order'} ? :
0 0 unless ($options->{$a}{'order'} || 9999) <=> ($options->{$b}{'order'} || 9999) or $config->{'added_order'} ? $options->{$a}{'added_order'} <=> $options->{$b}{'added_order'} : 0
45 0 4 if (@{$fullnames{$name};} > 1)
55 0 4 unless defined $doc
57 0 4 if $attributes{'spacer_before'}
58 0 4 $attributes{'hidden'} ? :
59 0 4 if $attributes{'spacer_after'}
66 4 0 if ($config->{'abbreviate'})
69 24 0 unless exists $fullnames{$abbreviated}
85 5 1 if ($arg eq '--' or $arg eq '-' or not $arg =~ /^-/)
91 0 1 if defined $arg_value
98 1 0 if ($dash eq '--')
100 1 0 if (defined $option_name)
101 1 0 if (@$option_name == 1) { }
111 0 1 if (defined $option_name) { }
118 0 0 if (defined $option_name and $options->{$option_name}{'format'})
142 0 13 if $config{'protect_argv'}
144 10 3 unless (defined $params{'invoked_as'})
150 0 13 if ($parsed_params->{'h'}) { }
0 13 elsif ($parsed_params->{'help'}) { }
0 13 elsif ($parsed_params->{'man'}) { }
159 13 0 if ($config{'prefer_commandline'}) { }
167 4 9 if (@ARGV and $ARGV[0] ne '--')
168 0 4 if ($ARGV[0] =~ /^--/) { }
4 0 elsif (%subcommands) { }
174 0 4 unless (defined $subcommand_class)
184 0 13 unless (eval { do { $self = $class->new(%merged_params); 1 } })
185 0 0 if ($@ =~ /^Attribute \((.*?)\) is required/) { }
0 0 elsif ($@ =~ /^Missing required arguments: (.*) at /) { }
0 0 elsif ($@ =~ /^(.*?) required/) { }
0 0 elsif ($@ =~ /^isa check .*?failed: /) { }
200 9 4 unless $subcommand_class
202 3 1 unless ref $subcommand_class
221 10 4 %subcommands ? :
223 0 14 if defined $config{'getopt_options'}
226 1 13 unless defined $prog_name
229 14 0 unless (defined $usage_str)
230 10 4 if (%subcommands) { }
250 0 14 if ($usage->{'should_die'})
258 1 45 if defined $val
270 0 0 if (@messages and &blessed($messages[0]) and $messages[0]->isa('CLI::Osprey::Descriptive::Usage')) { }
278 0 0 if @messages
281 0 0 if ($code) { }
286 0 0 if defined $code
293 0 0 unless (defined $usage and &blessed($usage) and $usage->isa('CLI::Osprey::Descriptive::Usage'))
300 0 0 if ($code) { }
305 0 0 if defined $code
312 0 0 unless (defined $usage and &blessed($usage) and $usage->isa('CLI::Osprey::Descriptive::Usage'))