Embra/Role/ExtraListDeps.pm

filter: Statementstmt 100% 32 / 32 Branchbran 60.0% 6 / 10 Conditioncond 33.3% 4 / 12 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 70.5% 48 / 68 CC 11 SCAR 23.3
CC
11
Cov
78%
add_extra_deps
14.5
BEGIN
1.1
BEGIN
1.0
CRAP 10.3
« Embra/Plugin/WrapZillaPlugin.pm ↑ Summary Embra/Role/Plugin.pm »
1 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package App::Embra::Role::ExtraListDeps;
5 6 $App::Embra::Role::ExtraListDeps::VERSION = '0.001'; # TRIAL
6 # ABSTRACT: allow a plugin to add more things to listdeps
7  
8 6 ▶use Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 6 requires 'extra_list_deps';
13  
14  
15 6 ▶method add_extra_deps( $class:, HashRef :$config, CPAN::Meta::Requirements :$reqs ) {
Subroutine BEGIN: called CC=1 SCAR=0.5
Subroutine add_extra_deps: called CC=11 SCAR=26.8
Branch: 4 branches
BranchTrueFalseTotal
if exists $args{"config"} and not +($Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef"))->check($config) 0 1 1
if exists $args{"reqs"} and not +($Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements"))->check($reqs) 0 1 1
if keys %args 0 1 1
if scalar @_ > 4 0 1 1
Condition33%4/12
exists $args{"config"} and not +($Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef"))->check($config)
!ll&&!rl&&r
010
$Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef")
l!l&&r!l&&!r
010
exists $args{"reqs"} and not +($Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements"))->check($reqs)
!ll&&!rl&&r
010
$Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements")
l!l&&r!l&&!r
010
MC/DC0%0/2
exists $args{"config"} and not +($Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef"))->check($config)
exists $args{"config"} not +($Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef"))->check($config)
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef")
$Method::Signatures::mutc{"cache"}{"HashRef"} "Method::Signatures"->_make_constraint("HashRef")
MC/DC0%0/2
exists $args{"reqs"} and not +($Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements"))->check($reqs)
exists $args{"reqs"} not +($Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements"))->check($reqs)
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements")
$Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements")
Truth table33%1/3
A and not(B)
A= exists $args{"config"}B= not +($Method::Signatures::mutc{"cache"}{"HashRef"} ||= "Method::Signatures"->_make_constraint("HashRef"))->check($config)
ABresult
0X0
100
111
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"HashRef"}B= "Method::Signatures"->_make_constraint("HashRef")
ABresult
1X1
011
000
Truth table33%1/3
A and not(B)
A= exists $args{"reqs"}B= not +($Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"} ||= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements"))->check($reqs)
ABresult
0X0
100
111
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"CPAN::Meta::Requirements"}B= "Method::Signatures"->_make_constraint("CPAN::Meta::Requirements")
ABresult
1X1
011
000
16 1 for my $extra ( $class->extra_list_deps( config => $config )) {
17 2 my ($p, $ver) = split qr{[ ]* = [ ]*}xms, $extra;
18 2 ▶ if( ! defined $ver ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $ver) 1 1 2
19 1 $ver = 0;
20 }
21 2 $reqs->add_minimum( $p, $ver );
22 }
23 }
24  
25 6 1;
26  
27 __END__
« Embra/Plugin/WrapZillaPlugin.pm ↑ Summary Embra/Role/Plugin.pm »