| 1 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 115 | package Mite::Source; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 115 | my ( $SHIM, $CALLER ) = ( "Mite::Shim", "Mite::Source" ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | 575 | ▶ | 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 | 0 | ▶ | sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | 91 | ▶ | sub __META__ { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__META__: called CC=4 SCAR=14.6
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 115 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 91 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 91 | ▶ | $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 | 91 | my $linear_isa = mro::get_linear_isa($class); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | BUILD => [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | ▶ | map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 91 | map { "$_\::BUILD" } reverse @$linear_isa | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | DEMOLISH => [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 91 | 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 | 124 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=44 SCAR=60.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 124 | ▶ | my $class = ref( $_[0] ) ? ref(shift) : shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 124 | ▶ | 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 | 124 | my $self = bless {}, $class; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | my $args = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | $meta->{HAS_BUILDARGS} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | ? $class->BUILDARGS(@_) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | : { ( @_ == 1 ) ? %{ $_[0] } : @_ }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 124 | my $no_build = delete $args->{__no_BUILD__}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | # Attribute file (type: Path) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | # has declaration, file lib/Mite/Source.pm, line 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 124 | ▶ | croak "Missing key in constructor: file" unless exists $args->{"file"}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 124 | do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 124 | my $coerced_value = do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 124 | my $to_coerce = $args->{"file"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 124 | ▶ | Scalar::Util::blessed($to_coerce) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($to_coerce) && $to_coerce->isa('Path::Tiny')
MC/DC0%0/2
builtin::blessed($to_coerce) && $to_coerce->isa('Path::Tiny')
builtin::blessed($to_coerce)
$to_coerce->isa('Path::Tiny')
Truth table33%1/3
A && B
A= builtin::blessed($to_coerce)B= $to_coerce->isa('Path::Tiny')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | and $to_coerce->isa(q[Path::Tiny]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | ) ? $to_coerce : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | defined($to_coerce) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
defined $to_coerce && do {
ref \$to_coerce eq 'SCALAR' or ref \(my $val = $to_coerce) eq 'SCALAR'
}
MC/DC0%0/2
defined $to_coerce && do {
ref \$to_coerce eq 'SCALAR' or ref \(my $val = $to_coerce) eq 'SCALAR'
}
defined $to_coerce
do {
ref \$to_coerce eq 'SCALAR' or ref \(my $val = $to_coerce) eq 'SCALAR'
}
Truth table0%0/3
A && B
A= defined $to_coerceB= do {
ref \$to_coerce eq 'SCALAR' or ref \(my $val = $to_coerce) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | ▶ | ref( \$to_coerce ) eq 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref \$to_coerce eq 'SCALAR' || ref \(my $val = $to_coerce) eq 'SCALAR'
MC/DC0%0/2
ref \$to_coerce eq 'SCALAR' || ref \(my $val = $to_coerce) eq 'SCALAR'
ref \$to_coerce eq 'SCALAR'
ref \(my $val = $to_coerce) eq 'SCALAR'
Truth table0%0/3
A || B
A= ref \$to_coerce eq 'SCALAR'B= ref \(my $val = $to_coerce) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | or ref( \( my $val = $to_coerce ) ) eq 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | ? scalar( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | do { local $_ = $to_coerce; Path::Tiny::path($_) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | defined($to_coerce) && !ref($to_coerce) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | or Scalar::Util::blessed($to_coerce) && ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | require overload; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 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]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | and overload::Method( ( ref $_[0] or $_[0] ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | $_[1] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | ▶ | )->( $to_coerce, q[""] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
defined $to_coerce && !ref($to_coerce) || builtin::blessed($to_coerce) && sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($to_coerce, '""')
defined $to_coerce and not ref $to_coerce
builtin::blessed($to_coerce) and sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($to_coerce, "\"\"")
MC/DC0%0/4
defined $to_coerce && !ref($to_coerce) || builtin::blessed($to_coerce) && sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($to_coerce, '""')
defined $to_coerce
not ref $to_coerce
builtin::blessed($to_coerce)
sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($to_coerce, "\"\"")
Truth table0%0/7
A and not(B) || C and D
A= defined $to_coerceB= not ref $to_coerceC= builtin::blessed($to_coerce)D= sub {
require overload;
overload::Overloaded(ref $_[0] || $_[0]) and overload::Method(ref $_[0] || $_[0], $_[1]);
}
->($to_coerce, "\"\"")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | ? scalar( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | do { local $_ = $to_coerce; Path::Tiny::path($_) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | : ( ( ref($to_coerce) eq 'ARRAY' ) ) ? scalar( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | do { local $_ = $to_coerce; Path::Tiny::path(@$_) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | : $to_coerce; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 124 | ▶ | blessed($coerced_value) && $coerced_value->isa("Path::Tiny") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($coerced_value) and $coerced_value->isa("Path::Tiny")
MC/DC0%0/2
builtin::blessed($coerced_value) and $coerced_value->isa("Path::Tiny")
builtin::blessed($coerced_value)
$coerced_value->isa("Path::Tiny")
Truth table33%1/3
A and B
A= builtin::blessed($coerced_value)B= $coerced_value->isa("Path::Tiny")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | "file", "Path"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 124 | $self->{"file"} = $coerced_value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | # Attribute classes (type: HashRef[Mite::Class]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | # has declaration, file lib/Mite/Source.pm, line 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 124 | do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | my $value = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | exists( $args->{"classes"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 124 | ▶ | ? $args->{"classes"} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | : $Mite::Source::__classes_DEFAULT__->($self); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 124 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 124 | ▶ | ( 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::Class')
};
};
$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::Class')
};
};
$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::Class')
};
};
$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::Class')
};
};
$ok
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 124 | my $ok = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 124 | for my $i ( values %{$value} ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | ( $ok = 0, last ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | unless ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 115 | ▶ | use Scalar::Util (); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | Scalar::Util::blessed($i) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($i) && $i->isa('Mite::Class')
MC/DC0%0/2
builtin::blessed($i) && $i->isa('Mite::Class')
builtin::blessed($i)
$i->isa('Mite::Class')
Truth table0%0/3
A && B
A= builtin::blessed($i)B= $i->isa('Mite::Class')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | and $i->isa(q[Mite::Class]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 124 | $ok; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | "classes", "HashRef[Mite::Class]"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 124 | $self->{"classes"} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | # Attribute class_order (type: ArrayRef[NonEmptyStr]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | # has declaration, file lib/Mite/Source.pm, line 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 124 | do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | my $value = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | exists( $args->{"class_order"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 124 | ▶ | ? $args->{"class_order"} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | : $Mite::Source::__class_order_DEFAULT__->($self); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 124 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 124 | ▶ | ( ref($value) eq 'ARRAY' ) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref $value eq 'ARRAY' && do {
my $ok = 1;
foreach my $i (@{$value;}) {
$ok = 0, last unless do {
defined $i and do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
} and length $i > 0;
};
$ok
}
MC/DC0%0/2
ref $value eq 'ARRAY' && do {
my $ok = 1;
foreach my $i (@{$value;}) {
$ok = 0, last unless do {
defined $i and do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
} and length $i > 0;
};
$ok
}
ref $value eq 'ARRAY'
do {
my $ok = 1;
foreach my $i (@{$value;}) {
$ok = 0, last unless do {
defined $i and do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
} and length $i > 0;
};
$ok
}
Truth table33%1/3
A && B
A= ref $value eq 'ARRAY'B= do {
my $ok = 1;
foreach my $i (@{$value;}) {
$ok = 0, last unless do {
defined $i and do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
} and length $i > 0;
};
$ok
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 124 | my $ok = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 124 | for my $i ( @{$value} ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | ( $ok = 0, last ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | unless ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | ▶ | do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
do {
defined $i and do {
ref \$i eq "SCALAR" or ref \(my $val = $i) eq "SCALAR"
}
} and length $i > 0
MC/DC0%0/2
do {
defined $i and do {
ref \$i eq "SCALAR" or ref \(my $val = $i) eq "SCALAR"
}
} and length $i > 0
do {
defined $i and do {
ref \$i eq "SCALAR" or ref \(my $val = $i) eq "SCALAR"
}
}
length $i > 0
Truth table0%0/3
A and B
A= do {
defined $i and do {
ref \$i eq "SCALAR" or ref \(my $val = $i) eq "SCALAR"
}
}B= length $i > 0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | package Mite::Shim; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | ▶ | defined($i) and do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
defined $i && do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
MC/DC0%0/2
defined $i && do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
defined $i
do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
Truth table0%0/3
A && B
A= defined $iB= do {
ref \$i eq 'SCALAR' or ref \(my $val = $i) eq 'SCALAR'
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | ▶ | ref( \$i ) eq 'SCALAR' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref \$i eq 'SCALAR' || ref \(my $val = $i) eq 'SCALAR'
MC/DC0%0/2
ref \$i eq 'SCALAR' || ref \(my $val = $i) eq 'SCALAR'
ref \$i eq 'SCALAR'
ref \(my $val = $i) eq 'SCALAR'
Truth table0%0/3
A || B
A= ref \$i eq 'SCALAR'B= ref \(my $val = $i) eq 'SCALAR'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | or ref( \( my $val = $i ) ) eq | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 'SCALAR'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | && ( length($i) > 0 ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 124 | $ok; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | "class_order", "ArrayRef[NonEmptyStr]"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 124 | $self->{"class_order"} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | # Attribute compiled (type: Mite::Compiled) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | # has declaration, file lib/Mite/Source.pm, line 34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 124 | ▶ | if ( exists $args->{"compiled"} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | blessed( $args->{"compiled"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | ▶ | && $args->{"compiled"}->isa("Mite::Compiled") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
builtin::blessed($args->{"compiled"}) and $args->{"compiled"}->isa("Mite::Compiled")
MC/DC0%0/2
builtin::blessed($args->{"compiled"}) and $args->{"compiled"}->isa("Mite::Compiled")
builtin::blessed($args->{"compiled"})
$args->{"compiled"}->isa("Mite::Compiled")
Truth table0%0/3
A and B
A= builtin::blessed($args->{"compiled"})B= $args->{"compiled"}->isa("Mite::Compiled")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | "compiled", "Mite::Compiled"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | $self->{"compiled"} = $args->{"compiled"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | # Attribute project (type: Mite::Project) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | # has declaration, file lib/Mite/Source.pm, line 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | 124 | ▶ | if ( exists $args->{"project"} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | blessed( $args->{"project"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | 124 | ▶ | && $args->{"project"}->isa("Mite::Project") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($args->{"project"}) and $args->{"project"}->isa("Mite::Project")
MC/DC0%0/2
builtin::blessed($args->{"project"}) and $args->{"project"}->isa("Mite::Project")
builtin::blessed($args->{"project"})
$args->{"project"}->isa("Mite::Project")
Truth table33%1/3
A and B
A= builtin::blessed($args->{"project"})B= $args->{"project"}->isa("Mite::Project")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | or croak "Type check failed in constructor: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | "project", "Mite::Project"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 124 | $self->{"project"} = $args->{"project"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | require Scalar::Util && Scalar::Util::weaken( $self->{"project"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 124 | ▶ | if ref $self->{"project"}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
ref $self->{'project'} && (require Scalar::Util && builtin::weaken($self->{'project'}))
require Scalar::Util and builtin::weaken($self->{"project"})
MC/DC0%0/3
ref $self->{'project'} && (require Scalar::Util && builtin::weaken($self->{'project'}))
ref $self->{'project'}
require Scalar::Util
builtin::weaken($self->{"project"})
Truth table0%0/4
A && B and C
A= ref $self->{'project'}B= require Scalar::UtilC= builtin::weaken($self->{"project"})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | # Call BUILD methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 124 | ▶ | $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'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | # Unrecognized parameters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | my @unknown = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | grep not(/\A(?:c(?:lass(?:_order|es)|ompiled)|file|project)\z/), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | 124 | keys %{$args}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | @unknown | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 124 | ▶ | and croak( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | 124 | return $self; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | # Used by constructor to call BUILD methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | ▶ | sub BUILDALL { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BUILDALL: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | my $class = ref( $_[0] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 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__
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 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'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | # Destructor should call DEMOLISH methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 0 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: not called CC=7 SCAR=37.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | ▶ | my $class = ref($self) || $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 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__
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | ▶ | my $in_global_destruction = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | defined ${^GLOBAL_PHASE} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | ? ${^GLOBAL_PHASE} eq 'DESTRUCT' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | : Devel::GlobalDestruction::in_global_destruction(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$meta->{'DEMOLISH'} || []
MC/DC0%0/1
$meta->{'DEMOLISH'} || []
$meta->{'DEMOLISH'}
Truth table0%0/2
A
A= $meta->{'DEMOLISH'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 0 | my $e = do { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | local ( $?, $@ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | eval { $demolisher->( $self, $in_global_destruction ) }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | $@; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | 115 | ▶ | no warnings 'misc'; # avoid (in cleanup) warnings | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | ▶ | die $e if $e; # rethrow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | my $__XS = !$ENV{PERL_ONLY} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 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')
}
}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | # Accessors for class_order | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | # has declaration, file lib/Mite/Source.pm, line 25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 115 | ▶ | if ($__XS) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 115 | Class::XSAccessor->import( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | chained => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | "getters" => { "class_order" => "class_order" }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | ▶ | *class_order = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | 0 | ▶ | @_ == 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | or croak('Reader "class_order" usage: $self->class_order()'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | $_[0]{"class_order"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | # Accessors for classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | # has declaration, file lib/Mite/Source.pm, line 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | 115 | ▶ | if ($__XS) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 115 | Class::XSAccessor->import( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | chained => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | "getters" => { "classes" => "classes" }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | ▶ | *classes = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | ▶ | @_ == 1 or croak('Reader "classes" usage: $self->classes()'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | $_[0]{"classes"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | # Accessors for compiled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | # has declaration, file lib/Mite/Source.pm, line 34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | 97 | ▶ | sub compiled { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
compiled: called CC=5 SCAR=17.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 97 | ▶ | @_ == 1 or croak('Reader "compiled" usage: $self->compiled()'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | exists( $_[0]{"compiled"} ) ? $_[0]{"compiled"} : ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 97 | ▶ | $_[0]{"compiled"} = do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 96 | my $default_value = | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | $Mite::Source::__compiled_DEFAULT__->( $_[0] ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 96 | ▶ | blessed($default_value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
builtin::blessed($default_value) and $default_value->isa("Mite::Compiled")
MC/DC0%0/2
builtin::blessed($default_value) and $default_value->isa("Mite::Compiled")
builtin::blessed($default_value)
$default_value->isa("Mite::Compiled")
Truth table33%1/3
A and B
A= builtin::blessed($default_value)B= $default_value->isa("Mite::Compiled")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | && $default_value->isa("Mite::Compiled") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | or croak( "Type check failed in default: %s should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | "compiled", "Mite::Compiled" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 96 | $default_value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | # Accessors for file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | # has declaration, file lib/Mite/Source.pm, line 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 115 | ▶ | if ($__XS) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 115 | Class::XSAccessor->import( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | chained => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | "getters" => { "file" => "file" }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | ▶ | *file = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | ▶ | @_ == 1 or croak('Reader "file" usage: $self->file()'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | $_[0]{"file"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | # Accessors for project | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | # has declaration, file lib/Mite/Source.pm, line 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | 1349 | ▶ | sub project { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
project: called CC=6 SCAR=34.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | @_ > 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | ? do { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | ▶ | blessed( $_[1] ) && $_[1]->isa("Mite::Project") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
builtin::blessed($_[1]) and $_[1]->isa("Mite::Project")
MC/DC0%0/2
builtin::blessed($_[1]) and $_[1]->isa("Mite::Project")
builtin::blessed($_[1])
$_[1]->isa("Mite::Project")
Truth table0%0/3
A and B
A= builtin::blessed($_[1])B= $_[1]->isa("Mite::Project")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | or croak( "Type check failed in %s: value should be %s", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | "accessor", "Mite::Project" ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | $_[0]{"project"} = $_[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | require Scalar::Util && Scalar::Util::weaken( $_[0]{"project"} ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | ▶ | if ref $_[0]{"project"}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
ref $_[0]{'project'} && (require Scalar::Util && builtin::weaken($_[0]{'project'}))
require Scalar::Util and builtin::weaken($_[0]{"project"})
MC/DC0%0/3
ref $_[0]{'project'} && (require Scalar::Util && builtin::weaken($_[0]{'project'}))
ref $_[0]{'project'}
require Scalar::Util
builtin::weaken($_[0]{"project"})
Truth table0%0/4
A && B and C
A= ref $_[0]{'project'}B= require Scalar::UtilC= builtin::weaken($_[0]{"project"})
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | $_[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | 1349 | ▶ | : ( $_[0]{"project"} ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | # See UNIVERSAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | ▶ | sub DOES { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DOES: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | my ( $self, $role ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | our %DOES; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | 0 | ▶ | return $DOES{$role} if exists $DOES{$role}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | 0 | ▶ | return 1 if $role eq __PACKAGE__; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | and my $meta = Moose::Util::find_meta( ref $self or $self ) ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 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)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | return $self->SUPER::DOES($role); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | # Alias for Moose/Moo-compatibility | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | ▶ | sub does { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
does: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | shift->DOES(@_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 115 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||