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