Branch Coverage

blib/lib/App/Spec/Role/Command.pm
Criterion Covered Total %
branch 37 50 74.0


line true false branch
31 30 3 $self->subcommands ? :
39 0 585 unless ref $_
41 0 434 unless $spec{'options'}
42 0 434 unless $spec{'parameters'}
45 295 139 unless $spec{'subcommands'}
54 291 143 if (defined(my $op = $spec{'op'}))
55 0 291 unless $op =~ /^\w+\z/
57 91 343 if (defined(my $class = $spec{'class'}))
58 0 91 unless $class =~ /^ \w+ (?: ::\w+)* \z/x
66 0 91 unless (defined $file)
77 2 25 if ($plugin =~ /^-(.*)/)
86 85 0 unless ($plugin =~ s/^=//)
103 0 91 if (ref $file eq 'GLOB') { }
29 62 elsif (not ref $file) { }
29 33 elsif (ref $file eq 'SCALAR') { }
33 0 elsif (ref $file eq 'HASH') { }
118 0 91 unless ($spec)
127 31 60 if (@$plugins)
138 31 60 if (@$plugins)
142 60 25 if ($plugin->does('App::Spec::Role::Plugin::Subcommand'))
145 60 0 unless XXX
147 52 8 if ($subcommands)
154 56 29 if ($plugin->does('App::Spec::Role::Plugin::GlobalOptions'))
157 56 0 if ($new_opts)
162 56 0 unless (&any(sub { $_->name eq $opt->name; } , @$options))