| 1 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 115 | package Mite::Project; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 115 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 115 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 115 | ▶ | no warnings qw( once void ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 115 | our $USES_MITE = "Mite::Class"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 115 | our $MITE_SHIM = "Mite::Shim"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 115 | our $MITE_VERSION = "0.013000"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | # Mite keywords | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 115 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 115 | my ( $SHIM, $CALLER ) = ( "Mite::Shim", "Mite::Project" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | *after, *around, *before, *extends, *field, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | *has, *param, *signature_for, *with | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 115 | = do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 115 | ▶ | no warnings 'redefine'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | ▶ | sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | ▶ | sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | ▶ | sub { }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub { $SHIM->HANDLE_has( $CALLER, field => @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 460 | ▶ | sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | sub { $SHIM->HANDLE_has( $CALLER, param => @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 345 | ▶ | sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 115 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | # Mite imports | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 115 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 115 | require Scalar::Util; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 115 | *STRICT = \&Mite::Shim::STRICT; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 115 | *bare = \&Mite::Shim::bare; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 115 | *blessed = \&Scalar::Util::blessed; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 115 | *carp = \&Mite::Shim::carp; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 115 | *confess = \&Mite::Shim::confess; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 115 | *croak = \&Mite::Shim::croak; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 115 | *false = \&Mite::Shim::false; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 115 | *guard = \&Mite::Shim::guard; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 115 | *lazy = \&Mite::Shim::lazy; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 115 | *lock = \&Mite::Shim::lock; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 115 | *ro = \&Mite::Shim::ro; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 115 | *rw = \&Mite::Shim::rw; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 115 | *rwp = \&Mite::Shim::rwp; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 115 | *true = \&Mite::Shim::true; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 115 | *unlock = \&Mite::Shim::unlock; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | # Gather metadata for constructor and destructor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 114 | ▶ | sub __META__ { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__META__: called CC=4 SCAR=14.6
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 115 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 114 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 114 | ▶ | $class = ref($class) || $class; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 114 | my $linear_isa = mro::get_linear_isa($class); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | BUILD => [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | ▶ | map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 114 | map { "$_\::BUILD" } reverse @$linear_isa | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | DEMOLISH => [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 114 | map { "$_\::DEMOLISH" } @$linear_isa | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | HAS_BUILDARGS => $class->can('BUILDARGS'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | # Standard Moose/Moo-style constructor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 117 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=29 SCAR=50.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 117 | ▶ | my $class = ref( $_[0] ) ? ref(shift) : shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 117 | ▶ | my $meta = ( $Mite::META{$class} ||= $class->__META__ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$Mite::META{$class} ||= $class->__META__
MC/DC0%0/2
$Mite::META{$class} ||= $class->__META__
$Mite::META{$class}
$class->__META__
Truth table66%2/3
A ||= B
A= $Mite::META{$class}B= $class->__META__
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 117 | my $self = bless {}, $class; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | my $args = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | $meta->{HAS_BUILDARGS} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | ? $class->BUILDARGS(@_) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | : { ( @_ == 1 ) ? %{ $_[0] } : @_ }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 117 | my $no_build = delete $args->{__no_BUILD__}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | # Attribute sources (type: HashRef[Mite::Source]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | # has declaration, file lib/Mite/Project.pm, line 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 117 | do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | my $value = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | exists( $args->{"sources"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 117 | ▶ | ? $args->{"sources"} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | : $Mite::Project::__sources_DEFAULT__->($self); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 117 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 117 | ▶ | ( ref($value) eq 'HASH' ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref $value eq 'HASH' && do {
my $ok = 1;
foreach my $i (values %{$value;}) {
$ok = 0, last unless do {
builtin::blessed($i) and $i->isa('Mite::Source')
};
};
$ok
}
MC/DC0%0/2
ref $value eq 'HASH' && do {
my $ok = 1;
foreach my $i (values %{$value;}) {
$ok = 0, last unless do {
builtin::blessed($i) and $i->isa('Mite::Source')
};
};
$ok
}
ref $value eq 'HASH'
do {
my $ok = 1;
foreach my $i (values %{$value;}) {
$ok = 0, last unless do {
builtin::blessed($i) and $i->isa('Mite::Source')
};
};
$ok
}
Truth table33%1/3
A && B
A= ref $value eq 'HASH'B= do {
my $ok = 1;
foreach my $i (values %{$value;}) {
$ok = 0, last unless do {
builtin::blessed($i) and $i->isa('Mite::Source')
};
};
$ok
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 117 | my $ok = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 117 | for my $i ( values %{$value} ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | ( $ok = 0, last ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | unless ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | Scalar::Util::blessed($i) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($i) && $i->isa('Mite::Source')
MC/DC0%0/2
builtin::blessed($i) && $i->isa('Mite::Source')
builtin::blessed($i)
$i->isa('Mite::Source')
Truth table0%0/3
A && B
A= builtin::blessed($i)B= $i->isa('Mite::Source')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | and $i->isa(q[Mite::Source]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 117 | $ok; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | "sources", "HashRef[Mite::Source]"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 117 | $self->{"sources"} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | # Attribute config (type: Mite::Config) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | # has declaration, file lib/Mite/Project.pm, line 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 117 | ▶ | if ( exists $args->{"config"} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | blessed( $args->{"config"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | ▶ | && $args->{"config"}->isa("Mite::Config") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
builtin::blessed($args->{"config"}) and $args->{"config"}->isa("Mite::Config")
MC/DC0%0/2
builtin::blessed($args->{"config"}) and $args->{"config"}->isa("Mite::Config")
builtin::blessed($args->{"config"})
$args->{"config"}->isa("Mite::Config")
Truth table0%0/3
A and B
A= builtin::blessed($args->{"config"})B= $args->{"config"}->isa("Mite::Config")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | "config", "Mite::Config"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | $self->{"config"} = $args->{"config"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | # Attribute _module_fakeout_namespace (type: Str|Undef) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | # has declaration, file lib/Mite/Project.pm, line 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 117 | ▶ | if ( exists $args->{"_module_fakeout_namespace"} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | defined( $args->{"_module_fakeout_namespace"} ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
defined $args->{'_module_fakeout_namespace'} && do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
MC/DC0%0/2
defined $args->{'_module_fakeout_namespace'} && do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
defined $args->{'_module_fakeout_namespace'}
do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
Truth table0%0/3
A && B
A= defined $args->{'_module_fakeout_namespace'}B= do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | ref( \$args->{"_module_fakeout_namespace"} ) eq | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | or ref( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | \( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | my $val = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | ▶ | $args->{"_module_fakeout_namespace"} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' || ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
MC/DC0%0/2
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' || ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR'
ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
Truth table0%0/3
A || B
A= ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR'B= ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | ) eq 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | ▶ | or do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
do {
defined $args->{'_module_fakeout_namespace'} and do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
} || do {
not defined $args->{'_module_fakeout_namespace'}
}
MC/DC0%0/2
do {
defined $args->{'_module_fakeout_namespace'} and do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
} || do {
not defined $args->{'_module_fakeout_namespace'}
}
do {
defined $args->{'_module_fakeout_namespace'} and do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
}
do {
not defined $args->{'_module_fakeout_namespace'}
}
Truth table0%0/3
A || B
A= do {
defined $args->{'_module_fakeout_namespace'} and do {
ref \$args->{'_module_fakeout_namespace'} eq 'SCALAR' or ref \(my $val = $args->{'_module_fakeout_namespace'}) eq 'SCALAR'
}
}B= do {
not defined $args->{'_module_fakeout_namespace'}
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | !defined( $args->{"_module_fakeout_namespace"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | "_module_fakeout_namespace", "Str|Undef"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | $self->{"_module_fakeout_namespace"} = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | $args->{"_module_fakeout_namespace"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | # Attribute debug (type: Bool) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | # has declaration, file lib/Mite/Project.pm, line 30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 117 | do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 117 | ▶ | my $value = exists( $args->{"debug"} ) ? $args->{"debug"} : false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 117 | ▶ | !ref $value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%4/12
not ref $value and !defined($value) || $value eq "" || $value eq 0 || $value eq 1
not defined $value or $value eq "" or $value eq 0 or $value eq 1
not defined $value or $value eq "" or $value eq 0
not defined $value or $value eq ""
MC/DC0%0/5
not ref $value and !defined($value) || $value eq "" || $value eq 0 || $value eq 1
not ref $value
not defined $value
$value eq ""
$value eq 0
$value eq 1
Truth table16%1/6
not(A) and not(B) or C or D or E
A= not ref $valueB= not defined $valueC= $value eq ""D= $value eq 0E= $value eq 1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | and ( !defined $value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | or $value eq q() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | or $value eq '0' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | or $value eq '1' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | "debug", "Bool"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 117 | $self->{"debug"} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | # Call BUILD methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 117 | ▶ | $self->BUILDALL($args) if ( !$no_build and @{ $meta->{BUILD} || [] } ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition40%2/5
not $no_build and @{$meta->{"BUILD"} or [];}
$meta->{'BUILD'} || []
MC/DC0%0/2
not $no_build and @{$meta->{"BUILD"} or [];}
not $no_build
@{$meta->{"BUILD"} or [];}
MC/DC0%0/1
$meta->{'BUILD'} || []
$meta->{'BUILD'}
Truth table33%1/3
not(A) and B
A= not $no_buildB= @{$meta->{"BUILD"} or [];}
Truth table50%1/2
A
A= $meta->{'BUILD'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | # Unrecognized parameters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | my @unknown = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | grep not(/\A(?:_module_fakeout_namespace|config|debug|sources)\z/), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 117 | keys %{$args}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | @unknown | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 117 | ▶ | and croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 117 | return $self; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | # Used by constructor to call BUILD methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | ▶ | sub BUILDALL { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BUILDALL: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | my $class = ref( $_[0] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | my $meta = ( $Mite::META{$class} ||= $class->__META__ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$Mite::META{$class} ||= $class->__META__
MC/DC0%0/2
$Mite::META{$class} ||= $class->__META__
$Mite::META{$class}
$class->__META__
Truth table0%0/3
A ||= B
A= $Mite::META{$class}B= $class->__META__
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | ▶ | $_->(@_) for @{ $meta->{BUILD} || [] }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$meta->{'BUILD'} || []
MC/DC0%0/1
$meta->{'BUILD'} || []
$meta->{'BUILD'}
Truth table0%0/2
A
A= $meta->{'BUILD'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | # Destructor should call DEMOLISH methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 5 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=7 SCAR=25.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 5 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 5 | ▶ | my $class = ref($self) || $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table33%1/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 5 | ▶ | my $meta = ( $Mite::META{$class} ||= $class->__META__ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$Mite::META{$class} ||= $class->__META__
MC/DC0%0/2
$Mite::META{$class} ||= $class->__META__
$Mite::META{$class}
$class->__META__
Truth table33%1/3
A ||= B
A= $Mite::META{$class}B= $class->__META__
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 5 | ▶ | my $in_global_destruction = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | defined ${^GLOBAL_PHASE} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | ? ${^GLOBAL_PHASE} eq 'DESTRUCT' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | : Devel::GlobalDestruction::in_global_destruction(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 5 | ▶ | for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$meta->{'DEMOLISH'} || []
MC/DC0%0/1
$meta->{'DEMOLISH'} || []
$meta->{'DEMOLISH'}
Truth table50%1/2
A
A= $meta->{'DEMOLISH'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | my $e = do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | local ( $?, $@ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | eval { $demolisher->( $self, $in_global_destruction ) }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 0 | $@; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 115 | ▶ | no warnings 'misc'; # avoid (in cleanup) warnings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | ▶ | die $e if $e; # rethrow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | 5 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | my $__XS = !$ENV{PERL_ONLY} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 115 | ▶ | && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
!$ENV{'PERL_ONLY'} && eval {
do {
require Class::XSAccessor;
'Class::XSAccessor'->VERSION('1.19')
}
}
MC/DC0%0/2
!$ENV{'PERL_ONLY'} && eval {
do {
require Class::XSAccessor;
'Class::XSAccessor'->VERSION('1.19')
}
}
!$ENV{'PERL_ONLY'}
eval {
do {
require Class::XSAccessor;
'Class::XSAccessor'->VERSION('1.19')
}
}
Truth table33%1/3
not(A) && B
A= !$ENV{'PERL_ONLY'}B= eval {
do {
require Class::XSAccessor;
'Class::XSAccessor'->VERSION('1.19')
}
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | # Accessors for _module_fakeout_namespace | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | # has declaration, file lib/Mite/Project.pm, line 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | 530 | ▶ | sub _module_fakeout_namespace { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_module_fakeout_namespace: called CC=6 SCAR=34.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | @_ > 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | ? do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
do {
defined $_[1] and do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
} || !defined($_[1])
MC/DC0%0/2
do {
defined $_[1] and do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
} || !defined($_[1])
do {
defined $_[1] and do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
}
!defined($_[1])
Truth table0%0/3
A || not(B)
A= do {
defined $_[1] and do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
}B= !defined($_[1])
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | ▶ | defined( $_[1] ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
defined $_[1] && do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
MC/DC0%0/2
defined $_[1] && do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
defined $_[1]
do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
Truth table0%0/3
A && B
A= defined $_[1]B= do {
ref \$_[1] eq 'SCALAR' or ref \(my $val = $_[1]) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 0 | ▶ | ref( \$_[1] ) eq 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref \$_[1] eq 'SCALAR' || ref \(my $val = $_[1]) eq 'SCALAR'
MC/DC0%0/2
ref \$_[1] eq 'SCALAR' || ref \(my $val = $_[1]) eq 'SCALAR'
ref \$_[1] eq 'SCALAR'
ref \(my $val = $_[1]) eq 'SCALAR'
Truth table0%0/3
A || B
A= ref \$_[1] eq 'SCALAR'B= ref \(my $val = $_[1]) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | or ref( \( my $val = $_[1] ) ) eq 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | or ( !defined( $_[1] ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | or croak( "Type check failed in %s: value should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | "accessor", "Str|Undef" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | $_[0]{"_module_fakeout_namespace"} = $_[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 530 | ▶ | : ( $_[0]{"_module_fakeout_namespace"} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | # Accessors for config | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | # has declaration, file lib/Mite/Project.pm, line 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | 992 | ▶ | sub config { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
config: called CC=5 SCAR=17.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | 992 | ▶ | @_ == 1 or croak('Reader "config" usage: $self->config()'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | exists( $_[0]{"config"} ) ? $_[0]{"config"} : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | 992 | ▶ | $_[0]{"config"} = do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 112 | my $default_value = | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | $Mite::Project::__config_DEFAULT__->( $_[0] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 112 | ▶ | blessed($default_value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($default_value) and $default_value->isa("Mite::Config")
MC/DC0%0/2
builtin::blessed($default_value) and $default_value->isa("Mite::Config")
builtin::blessed($default_value)
$default_value->isa("Mite::Config")
Truth table33%1/3
A and B
A= builtin::blessed($default_value)B= $default_value->isa("Mite::Config")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | && $default_value->isa("Mite::Config") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | or croak( "Type check failed in default: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | "config", "Mite::Config" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 112 | $default_value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | # Accessors for debug | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | # has declaration, file lib/Mite/Project.pm, line 30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 348 | ▶ | sub debug { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
debug: called CC=7 SCAR=24.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | @_ > 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | ? do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 22 | ▶ | !ref $_[1] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%4/12
not ref $_[1] and !defined($_[1]) || $_[1] eq "" || $_[1] eq 0 || $_[1] eq 1
not defined $_[1] or $_[1] eq "" or $_[1] eq 0 or $_[1] eq 1
not defined $_[1] or $_[1] eq "" or $_[1] eq 0
not defined $_[1] or $_[1] eq ""
MC/DC0%0/5
not ref $_[1] and !defined($_[1]) || $_[1] eq "" || $_[1] eq 0 || $_[1] eq 1
not ref $_[1]
not defined $_[1]
$_[1] eq ""
$_[1] eq 0
$_[1] eq 1
Truth table16%1/6
not(A) and not(B) or C or D or E
A= not ref $_[1]B= not defined $_[1]C= $_[1] eq ""D= $_[1] eq 0E= $_[1] eq 1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | and ( !defined $_[1] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | or $_[1] eq q() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | or $_[1] eq '0' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | or $_[1] eq '1' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | or croak( "Type check failed in %s: value should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | "accessor", "Bool" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 22 | $_[0]{"debug"} = $_[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | 22 | $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 348 | ▶ | : ( $_[0]{"debug"} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | # Accessors for sources | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | # has declaration, file lib/Mite/Project.pm, line 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 115 | ▶ | if ($__XS) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 115 | Class::XSAccessor->import( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | chained => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | "getters" => { "sources" => "sources" }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | ▶ | *sources = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | ▶ | @_ == 1 or croak('Reader "sources" usage: $self->sources()'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | $_[0]{"sources"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | # See UNIVERSAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | sub DOES { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DOES: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | my ( $self, $role ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | our %DOES; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | ▶ | return $DOES{$role} if exists $DOES{$role}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | ▶ | return 1 if $role eq __PACKAGE__; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | ▶ | if ( $INC{'Moose/Util.pm'} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$INC{"Moose/Util.pm"} and my $meta = Moose::Util::find_meta(ref $self || $self)
ref $self || $self
MC/DC0%0/2
$INC{"Moose/Util.pm"} and my $meta = Moose::Util::find_meta(ref $self || $self)
$INC{"Moose/Util.pm"}
my $meta = Moose::Util::find_meta(ref $self || $self)
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A and B
A= $INC{"Moose/Util.pm"}B= my $meta = Moose::Util::find_meta(ref $self || $self)
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | and my $meta = Moose::Util::find_meta( ref $self or $self ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | ▶ | $meta->can('does_role') and $meta->does_role($role) and return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$meta->can("does_role") and $meta->does_role($role)
MC/DC0%0/2
$meta->can("does_role") and $meta->does_role($role)
$meta->can("does_role")
$meta->does_role($role)
Truth table0%0/3
A and B
A= $meta->can("does_role")B= $meta->does_role($role)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | return $self->SUPER::DOES($role); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | # Alias for Moose/Moo-compatibility | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | 0 | ▶ | sub does { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
does: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | shift->DOES(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | # Method signatures | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 115 | our %SIGNATURE_FOR; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | 17 | ▶ | $SIGNATURE_FOR{"_recurse_directory"} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=16 SCAR=40.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | 17 | my $__NEXT__ = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 17 | my ( @out, %tmp, $tmp, $dtmp, @head ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 17 | ▶ | @_ == 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | croak( "Wrong number of parameters in signature for %s: got %d, %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | "_recurse_directory", scalar(@_), "expected exactly 3 parameters" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 17 | @head = splice( @_, 0, 1 ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | # Parameter invocant (type: Defined) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 17 | ▶ | ( defined( $head[0] ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | "Type check failed in signature for _recurse_directory: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | "\$_[0]", "Defined" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | # Parameter $_[0] (type: Path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | $tmp = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 17 | ▶ | Scalar::Util::blessed( $_[0] ) and $_[0]->isa(q[Path::Tiny]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($_[0]) && $_[0]->isa('Path::Tiny')
MC/DC0%0/2
builtin::blessed($_[0]) && $_[0]->isa('Path::Tiny')
builtin::blessed($_[0])
$_[0]->isa('Path::Tiny')
Truth table33%1/3
A && B
A= builtin::blessed($_[0])B= $_[0]->isa('Path::Tiny')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | ) ? $_[0] : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | 17 | ▶ | defined( $_[0] ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
defined $_[0] && do {
ref \$_[0] eq 'SCALAR' or ref \(my $val = $_[0]) eq 'SCALAR'
}
MC/DC0%0/2
defined $_[0] && do {
ref \$_[0] eq 'SCALAR' or ref \(my $val = $_[0]) eq 'SCALAR'
}
defined $_[0]
do {
ref \$_[0] eq 'SCALAR' or ref \(my $val = $_[0]) eq 'SCALAR'
}
Truth table33%1/3
A && B
A= defined $_[0]B= do {
ref \$_[0] eq 'SCALAR' or ref \(my $val = $_[0]) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | 17 | ▶ | ref( \$_[0] ) eq 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref \$_[0] eq 'SCALAR' || ref \(my $val = $_[0]) eq 'SCALAR'
MC/DC0%0/2
ref \$_[0] eq 'SCALAR' || ref \(my $val = $_[0]) eq 'SCALAR'
ref \$_[0] eq 'SCALAR'
ref \(my $val = $_[0]) eq 'SCALAR'
Truth table33%1/3
A || B
A= ref \$_[0] eq 'SCALAR'B= ref \(my $val = $_[0]) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | or ref( \( my $val = $_[0] ) ) eq 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | ? scalar( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | 17 | ▶ | do { local $_ = $_[0]; Path::Tiny::path($_) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | defined( $_[0] ) && !ref( $_[0] ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | or Scalar::Util::blessed( $_[0] ) && ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | ▶ | sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | require overload; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | ▶ | overload::Overloaded( ref $_[0] or $_[0] ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
ref $_[0] || $_[0]
ref $_[0] || $_[0]
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0]
$_[0]
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0]
$_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | and overload::Method( ( ref $_[0] or $_[0] ), $_[1] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | ▶ | )->( $_[0], q[""] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
defined $_[0] && !ref($_[0]) || builtin::blessed($_[0]) && sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($_[0], '""')
defined $_[0] and not ref $_[0]
builtin::blessed($_[0]) and sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($_[0], "\"\"")
MC/DC0%0/4
defined $_[0] && !ref($_[0]) || builtin::blessed($_[0]) && sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($_[0], '""')
defined $_[0]
not ref $_[0]
builtin::blessed($_[0])
sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($_[0], "\"\"")
Truth table0%0/7
A and not(B) || C and D
A= defined $_[0]B= not ref $_[0]C= builtin::blessed($_[0])D= sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($_[0], "\"\"")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | ? scalar( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | 0 | ▶ | do { local $_ = $_[0]; Path::Tiny::path($_) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | : ( ( ref( $_[0] ) eq 'ARRAY' ) ) ? scalar( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | 0 | ▶ | do { local $_ = $_[0]; Path::Tiny::path(@$_) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | : $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 17 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | 17 | ▶ | Scalar::Util::blessed($tmp) and $tmp->isa(q[Path::Tiny]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($tmp) && $tmp->isa('Path::Tiny')
MC/DC0%0/2
builtin::blessed($tmp) && $tmp->isa('Path::Tiny')
builtin::blessed($tmp)
$tmp->isa('Path::Tiny')
Truth table33%1/3
A && B
A= builtin::blessed($tmp)B= $tmp->isa('Path::Tiny')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | "Type check failed in signature for _recurse_directory: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | "\$_[1]", "Path" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | 17 | push( @out, $tmp ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | # Parameter $_[1] (type: CodeRef) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 17 | ▶ | ( ref( $_[1] ) eq 'CODE' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | "Type check failed in signature for _recurse_directory: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | "\$_[2]", "CodeRef" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | 17 | push( @out, $_[1] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 17 | do { @_ = ( @head, @out ); goto $__NEXT__ }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 115 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | 119 | ▶ | $SIGNATURE_FOR{"inject_mite_functions"} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=29 SCAR=48.4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | 119 | my $__NEXT__ = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | 119 | my ( %out, %in, %tmp, $tmp, $dtmp, @head ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 119 | ▶ | @_ == 2 && ( ref( $_[1] ) eq 'HASH' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%3/9
@_ == 2 and ref $_[1] eq "HASH" or @_ % 2 == 1 and @_ >= 7
@_ == 2 and ref $_[1] eq "HASH"
@_ % 2 == 1 and @_ >= 7
MC/DC0%0/4
@_ == 2 and ref $_[1] eq "HASH" or @_ % 2 == 1 and @_ >= 7
@_ == 2
ref $_[1] eq "HASH"
@_ % 2 == 1
@_ >= 7
Truth table14%1/7
A and B or C and D
A= @_ == 2B= ref $_[1] eq "HASH"C= @_ % 2 == 1D= @_ >= 7
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | or @_ % 2 == 1 && @_ >= 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | croak( "Wrong number of parameters in signature for %s: got %d, %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | "inject_mite_functions", scalar(@_), "that does not seem right" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | 119 | @head = splice( @_, 0, 1 ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | # Parameter invocant (type: Defined) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | 119 | ▶ | ( defined( $head[0] ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | "Type check failed in signature for inject_mite_functions: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | "\$_[0]", "Defined" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 0 | ▶ | %in = ( @_ == 1 and ( ref( $_[0] ) eq 'HASH' ) ) ? %{ $_[0] } : @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@_ == 1 and ref $_[0] eq "HASH"
MC/DC0%0/2
@_ == 1 and ref $_[0] eq "HASH"
@_ == 1
ref $_[0] eq "HASH"
Truth table33%1/3
A and B
A= @_ == 1B= ref $_[0] eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | # Parameter package (type: Any) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | 119 | ▶ | exists( $in{"package"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | or croak( "Failure in signature for inject_mite_functions: " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | . 'Missing required parameter: package' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | 119 | 1; # ... nothing to do | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | 119 | ▶ | $out{"package"} = $in{"package"} if exists( $in{"package"} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | 119 | delete( $in{"package"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | # Parameter file (type: Any) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | 119 | ▶ | exists( $in{"file"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | or croak( "Failure in signature for inject_mite_functions: " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | . 'Missing required parameter: file' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | 119 | 1; # ... nothing to do | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | 119 | ▶ | $out{"file"} = $in{"file"} if exists( $in{"file"} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 119 | delete( $in{"file"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | # Parameter kind (type: Optional[Str]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | 119 | ▶ | if ( exists( $in{"kind"} ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | ▶ | defined( $in{"kind"} ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
defined $in{'kind'} && do {
ref \$in{'kind'} eq 'SCALAR' or ref \(my $val = $in{'kind'}) eq 'SCALAR'
}
MC/DC0%0/2
defined $in{'kind'} && do {
ref \$in{'kind'} eq 'SCALAR' or ref \(my $val = $in{'kind'}) eq 'SCALAR'
}
defined $in{'kind'}
do {
ref \$in{'kind'} eq 'SCALAR' or ref \(my $val = $in{'kind'}) eq 'SCALAR'
}
Truth table0%0/3
A && B
A= defined $in{'kind'}B= do {
ref \$in{'kind'} eq 'SCALAR' or ref \(my $val = $in{'kind'}) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | ref( \$in{"kind"} ) eq 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | 0 | ▶ | or ref( \( my $val = $in{"kind"} ) ) eq 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref \$in{'kind'} eq 'SCALAR' || ref \(my $val = $in{'kind'}) eq 'SCALAR'
MC/DC0%0/2
ref \$in{'kind'} eq 'SCALAR' || ref \(my $val = $in{'kind'}) eq 'SCALAR'
ref \$in{'kind'} eq 'SCALAR'
ref \(my $val = $in{'kind'}) eq 'SCALAR'
Truth table0%0/3
A || B
A= ref \$in{'kind'} eq 'SCALAR'B= ref \(my $val = $in{'kind'}) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | "Type check failed in signature for inject_mite_functions: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | "\$_{\"kind\"}", "Optional[Str]" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 0 | $out{"kind"} = $in{"kind"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | 0 | delete( $in{"kind"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | # Parameter arg (type: HashRef) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | 119 | ▶ | $dtmp = exists( $in{"arg"} ) ? $in{"arg"} : {}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | 119 | ▶ | ( ref($dtmp) eq 'HASH' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | "Type check failed in signature for inject_mite_functions: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | "\$_{\"arg\"}", "HashRef" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 119 | $out{"arg"} = $dtmp; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | 119 | delete( $in{"arg"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | # Parameter shim (type: Str) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | 119 | ▶ | exists( $in{"shim"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | or croak( "Failure in signature for inject_mite_functions: " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | . 'Missing required parameter: shim' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | 119 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | 119 | ▶ | defined( $in{"shim"} ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
defined $in{'shim'} && do {
ref \$in{'shim'} eq 'SCALAR' or ref \(my $val = $in{'shim'}) eq 'SCALAR'
}
MC/DC0%0/2
defined $in{'shim'} && do {
ref \$in{'shim'} eq 'SCALAR' or ref \(my $val = $in{'shim'}) eq 'SCALAR'
}
defined $in{'shim'}
do {
ref \$in{'shim'} eq 'SCALAR' or ref \(my $val = $in{'shim'}) eq 'SCALAR'
}
Truth table33%1/3
A && B
A= defined $in{'shim'}B= do {
ref \$in{'shim'} eq 'SCALAR' or ref \(my $val = $in{'shim'}) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | ref( \$in{"shim"} ) eq 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | 119 | ▶ | or ref( \( my $val = $in{"shim"} ) ) eq 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref \$in{'shim'} eq 'SCALAR' || ref \(my $val = $in{'shim'}) eq 'SCALAR'
MC/DC0%0/2
ref \$in{'shim'} eq 'SCALAR' || ref \(my $val = $in{'shim'}) eq 'SCALAR'
ref \$in{'shim'} eq 'SCALAR'
ref \(my $val = $in{'shim'}) eq 'SCALAR'
Truth table33%1/3
A || B
A= ref \$in{'shim'} eq 'SCALAR'B= ref \(my $val = $in{'shim'}) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | "Type check failed in signature for inject_mite_functions: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | "\$_{\"shim\"}", "Str" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | 119 | ▶ | $out{"shim"} = $in{"shim"} if exists( $in{"shim"} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | 119 | delete( $in{"shim"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | # Parameter x_source (type: Optional[Object]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | 119 | ▶ | if ( exists( $in{"x_source"} ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | 0 | Scalar::Util::blessed( $in{"x_source"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | "Type check failed in signature for inject_mite_functions: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | "\$_{\"x_source\"}", "Optional[Object]" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | 0 | $out{"x_source"} = $in{"x_source"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | 0 | delete( $in{"x_source"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | # Parameter x_pkg (type: Optional[Object]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | 119 | ▶ | if ( exists( $in{"x_pkg"} ) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | 0 | Scalar::Util::blessed( $in{"x_pkg"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | "Type check failed in signature for inject_mite_functions: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | "\$_{\"x_pkg\"}", "Optional[Object]" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | $out{"x_pkg"} = $in{"x_pkg"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | 0 | delete( $in{"x_pkg"} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | # Unrecognized parameters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | 119 | ▶ | "Failure in signature for inject_mite_functions: " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | . sprintf( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | q{Unrecognized parameter%s: %s}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | keys(%in) > 1 ? q{s} : q{}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | join q{, } => ( sort keys %in ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | ) if keys %in; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | 119 | do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | @_ = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | @head, $out{"package"}, $out{"file"}, $out{"kind"}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | 119 | $out{"arg"}, $out{"shim"}, $out{"x_source"}, $out{"x_pkg"} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | 119 | goto $__NEXT__; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | 115 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | 83 | ▶ | $SIGNATURE_FOR{"load_files"} = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=6 SCAR=18.4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | 83 | my $__NEXT__ = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | 83 | my ( %tmp, $tmp, @head ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | 83 | ▶ | @_ >= 2 && @_ <= 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@_ >= 2 and @_ <= 3
MC/DC0%0/2
@_ >= 2 and @_ <= 3
@_ >= 2
@_ <= 3
Truth table33%1/3
A and B
A= @_ >= 2B= @_ <= 3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | croak( "Wrong number of parameters in signature for %s: got %d, %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | "load_files", scalar(@_), "expected exactly 2 parameters" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | 83 | @head = splice( @_, 0, 1 ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | # Parameter invocant (type: Defined) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | 83 | ▶ | ( defined( $head[0] ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | "Type check failed in signature for load_files: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | "\$_[0]", "Defined" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | # Parameter $_[0] (type: ArrayRef) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | 83 | ▶ | ( ref( $_[0] ) eq 'ARRAY' ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | or croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | "Type check failed in signature for load_files: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | "\$_[1]", "ArrayRef" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | # Parameter $_[1] (type: Any) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | $#_ >= 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | 83 | ▶ | or do { @_ = ( @head, @_ ); goto $__NEXT__ }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | 5 | 1; # ... nothing to do | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | 5 | do { @_ = ( @head, @_ ); goto $__NEXT__ }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | 115 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | 115 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||