| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | { | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | package Mite::MakeMaker; | 
| 4 | 1 |  |  | 1 |  | 7 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 34 |  | 
| 5 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 33 |  | 
| 6 | 1 |  |  | 1 |  | 6 | no warnings qw( once void ); | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 132 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | our $USES_MITE    = "Mite::Class"; | 
| 9 |  |  |  |  |  |  | our $MITE_SHIM    = "Mite::Shim"; | 
| 10 |  |  |  |  |  |  | our $MITE_VERSION = "0.011000"; | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | # Mite keywords | 
| 13 |  |  |  |  |  |  | BEGIN { | 
| 14 | 1 |  |  | 1 |  | 6 | my ( $SHIM, $CALLER ) = ( "Mite::Shim", "Mite::MakeMaker" ); | 
| 15 |  |  |  |  |  |  | ( | 
| 16 |  |  |  |  |  |  | *after, *around, *before,        *extends, *field, | 
| 17 |  |  |  |  |  |  | *has,   *param,  *signature_for, *with | 
| 18 |  |  |  |  |  |  | ) | 
| 19 | 1 |  |  |  |  | 3 | = do { | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | package Mite::Shim; | 
| 22 | 1 |  |  | 1 |  | 6 | no warnings 'redefine'; | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 243 |  | 
| 23 |  |  |  |  |  |  | ( | 
| 24 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, | 
| 25 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, | 
| 26 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, | 
| 27 |  |  |  | 0 |  |  | sub { }, | 
| 28 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_has( $CALLER, field => @_ ) }, | 
| 29 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_has( $CALLER, has   => @_ ) }, | 
| 30 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_has( $CALLER, param => @_ ) }, | 
| 31 | 2 |  |  | 2 |  | 24 | sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, | 
| 32 | 0 |  |  | 0 |  | 0 | sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, | 
| 33 | 1 |  |  |  |  | 164 | ); | 
| 34 |  |  |  |  |  |  | }; | 
| 35 |  |  |  |  |  |  | } | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | # Mite imports | 
| 38 |  |  |  |  |  |  | BEGIN { | 
| 39 | 1 |  |  | 1 |  | 8 | require Scalar::Util; | 
| 40 | 1 |  |  |  |  | 3 | *STRICT  = \&Mite::Shim::STRICT; | 
| 41 | 1 |  |  |  |  | 2 | *bare    = \&Mite::Shim::bare; | 
| 42 | 1 |  |  |  |  | 2 | *blessed = \&Scalar::Util::blessed; | 
| 43 | 1 |  |  |  |  | 3 | *carp    = \&Mite::Shim::carp; | 
| 44 | 1 |  |  |  |  | 2 | *confess = \&Mite::Shim::confess; | 
| 45 | 1 |  |  |  |  | 2 | *croak   = \&Mite::Shim::croak; | 
| 46 | 1 |  |  |  |  | 2 | *false   = \&Mite::Shim::false; | 
| 47 | 1 |  |  |  |  | 2 | *guard   = \&Mite::Shim::guard; | 
| 48 | 1 |  |  |  |  | 3 | *lazy    = \&Mite::Shim::lazy; | 
| 49 | 1 |  |  |  |  | 2 | *lock    = \&Mite::Shim::lock; | 
| 50 | 1 |  |  |  |  | 2 | *ro      = \&Mite::Shim::ro; | 
| 51 | 1 |  |  |  |  | 2 | *rw      = \&Mite::Shim::rw; | 
| 52 | 1 |  |  |  |  | 2 | *rwp     = \&Mite::Shim::rwp; | 
| 53 | 1 |  |  |  |  | 3 | *true    = \&Mite::Shim::true; | 
| 54 | 1 |  |  |  |  | 36 | *unlock  = \&Mite::Shim::unlock; | 
| 55 |  |  |  |  |  |  | } | 
| 56 |  |  |  |  |  |  |  | 
| 57 |  |  |  |  |  |  | # Gather metadata for constructor and destructor | 
| 58 |  |  |  |  |  |  | sub __META__ { | 
| 59 | 1 |  |  | 1 |  | 5 | no strict 'refs'; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 561 |  | 
| 60 | 0 |  |  | 0 |  |  | my $class = shift; | 
| 61 | 0 |  | 0 |  |  |  | $class = ref($class) || $class; | 
| 62 | 0 |  |  |  |  |  | my $linear_isa = mro::get_linear_isa($class); | 
| 63 |  |  |  |  |  |  | return { | 
| 64 |  |  |  |  |  |  | BUILD => [ | 
| 65 | 0 | 0 |  |  |  |  | map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 66 | 0 |  |  |  |  |  | map { "$_\::BUILD" } reverse @$linear_isa | 
| 67 |  |  |  |  |  |  | ], | 
| 68 |  |  |  |  |  |  | DEMOLISH => [ | 
| 69 | 0 | 0 |  |  |  |  | map   { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 70 | 0 |  |  |  |  |  | map { "$_\::DEMOLISH" } @$linear_isa | 
|  | 0 |  |  |  |  |  |  | 
| 71 |  |  |  |  |  |  | ], | 
| 72 |  |  |  |  |  |  | HAS_BUILDARGS        => $class->can('BUILDARGS'), | 
| 73 |  |  |  |  |  |  | HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), | 
| 74 |  |  |  |  |  |  | }; | 
| 75 |  |  |  |  |  |  | } | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | # Standard Moose/Moo-style constructor | 
| 78 |  |  |  |  |  |  | sub new { | 
| 79 | 0 | 0 |  | 0 | 0 |  | my $class = ref( $_[0] ) ? ref(shift) : shift; | 
| 80 | 0 |  | 0 |  |  |  | my $meta  = ( $Mite::META{$class} ||= $class->__META__ ); | 
| 81 | 0 |  |  |  |  |  | my $self  = bless {}, $class; | 
| 82 |  |  |  |  |  |  | my $args = | 
| 83 |  |  |  |  |  |  | $meta->{HAS_BUILDARGS} | 
| 84 |  |  |  |  |  |  | ? $class->BUILDARGS(@_) | 
| 85 | 0 | 0 |  |  |  |  | : { ( @_ == 1 ) ? %{ $_[0] } : @_ }; | 
|  | 0 | 0 |  |  |  |  |  | 
| 86 | 0 |  |  |  |  |  | my $no_build = delete $args->{__no_BUILD__}; | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | # Call BUILD methods | 
| 89 | 0 | 0 | 0 |  |  |  | $self->BUILDALL($args) if ( !$no_build and @{ $meta->{BUILD} || [] } ); | 
|  | 0 | 0 |  |  |  |  |  | 
| 90 |  |  |  |  |  |  |  | 
| 91 |  |  |  |  |  |  | # Unrecognized parameters | 
| 92 |  |  |  |  |  |  | my @unknown = grep not( | 
| 93 |  |  |  |  |  |  | do { | 
| 94 |  |  |  |  |  |  |  | 
| 95 |  |  |  |  |  |  | package Mite::Shim; | 
| 96 | 0 | 0 |  |  |  |  | defined($_) and do { | 
| 97 | 0 | 0 |  |  |  |  | ref( \$_ ) eq 'SCALAR' | 
| 98 |  |  |  |  |  |  | or ref( \( my $val = $_ ) ) eq 'SCALAR'; | 
| 99 |  |  |  |  |  |  | } | 
| 100 |  |  |  |  |  |  | } | 
| 101 |  |  |  |  |  |  | ), | 
| 102 | 0 |  |  |  |  |  | keys %{$args}; | 
|  | 0 |  |  |  |  |  |  | 
| 103 |  |  |  |  |  |  | @unknown | 
| 104 | 0 | 0 |  |  |  |  | and croak( | 
| 105 |  |  |  |  |  |  | "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); | 
| 106 |  |  |  |  |  |  |  | 
| 107 | 0 |  |  |  |  |  | return $self; | 
| 108 |  |  |  |  |  |  | } | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | # Used by constructor to call BUILD methods | 
| 111 |  |  |  |  |  |  | sub BUILDALL { | 
| 112 | 0 |  |  | 0 | 0 |  | my $class = ref( $_[0] ); | 
| 113 | 0 |  | 0 |  |  |  | my $meta  = ( $Mite::META{$class} ||= $class->__META__ ); | 
| 114 | 0 | 0 |  |  |  |  | $_->(@_) for @{ $meta->{BUILD} || [] }; | 
|  | 0 |  |  |  |  |  |  | 
| 115 |  |  |  |  |  |  | } | 
| 116 |  |  |  |  |  |  |  | 
| 117 |  |  |  |  |  |  | # Destructor should call DEMOLISH methods | 
| 118 |  |  |  |  |  |  | sub DESTROY { | 
| 119 | 0 |  |  | 0 |  |  | my $self  = shift; | 
| 120 | 0 |  | 0 |  |  |  | my $class = ref($self) || $self; | 
| 121 | 0 |  | 0 |  |  |  | my $meta  = ( $Mite::META{$class} ||= $class->__META__ ); | 
| 122 | 0 | 0 |  |  |  |  | my $in_global_destruction = | 
| 123 |  |  |  |  |  |  | defined ${^GLOBAL_PHASE} | 
| 124 |  |  |  |  |  |  | ? ${^GLOBAL_PHASE} eq 'DESTRUCT' | 
| 125 |  |  |  |  |  |  | : Devel::GlobalDestruction::in_global_destruction(); | 
| 126 | 0 | 0 |  |  |  |  | for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { | 
|  | 0 |  |  |  |  |  |  | 
| 127 | 0 |  |  |  |  |  | my $e = do { | 
| 128 | 0 |  |  |  |  |  | local ( $?, $@ ); | 
| 129 | 0 |  |  |  |  |  | eval { $demolisher->( $self, $in_global_destruction ) }; | 
|  | 0 |  |  |  |  |  |  | 
| 130 | 0 |  |  |  |  |  | $@; | 
| 131 |  |  |  |  |  |  | }; | 
| 132 | 1 |  |  | 1 |  | 9 | no warnings 'misc';    # avoid (in cleanup) warnings | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 329 |  | 
| 133 | 0 | 0 |  |  |  |  | die $e if $e;          # rethrow | 
| 134 |  |  |  |  |  |  | } | 
| 135 | 0 |  |  |  |  |  | return; | 
| 136 |  |  |  |  |  |  | } | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | # See UNIVERSAL | 
| 139 |  |  |  |  |  |  | sub DOES { | 
| 140 | 0 |  |  | 0 | 0 |  | my ( $self, $role ) = @_; | 
| 141 | 0 |  |  |  |  |  | our %DOES; | 
| 142 | 0 | 0 |  |  |  |  | return $DOES{$role} if exists $DOES{$role}; | 
| 143 | 0 | 0 |  |  |  |  | return 1            if $role eq __PACKAGE__; | 
| 144 | 0 | 0 | 0 |  |  |  | if ( $INC{'Moose/Util.pm'} | 
|  |  |  | 0 |  |  |  |  | 
| 145 |  |  |  |  |  |  | and my $meta = Moose::Util::find_meta( ref $self or $self ) ) | 
| 146 |  |  |  |  |  |  | { | 
| 147 | 0 | 0 | 0 |  |  |  | $meta->can('does_role') and $meta->does_role($role) and return 1; | 
| 148 |  |  |  |  |  |  | } | 
| 149 | 0 |  |  |  |  |  | return $self->SUPER::DOES($role); | 
| 150 |  |  |  |  |  |  | } | 
| 151 |  |  |  |  |  |  |  | 
| 152 |  |  |  |  |  |  | # Alias for Moose/Moo-compatibility | 
| 153 |  |  |  |  |  |  | sub does { | 
| 154 | 0 |  |  | 0 | 0 |  | shift->DOES(@_); | 
| 155 |  |  |  |  |  |  | } | 
| 156 |  |  |  |  |  |  |  | 
| 157 |  |  |  |  |  |  | # Method signatures | 
| 158 |  |  |  |  |  |  | our %SIGNATURE_FOR; | 
| 159 |  |  |  |  |  |  |  | 
| 160 |  |  |  |  |  |  | $SIGNATURE_FOR{"change_parent_dir"} = sub { | 
| 161 |  |  |  |  |  |  | my $__NEXT__ = shift; | 
| 162 |  |  |  |  |  |  |  | 
| 163 |  |  |  |  |  |  | my ( @out, %tmp, $tmp, $dtmp, @head ); | 
| 164 |  |  |  |  |  |  |  | 
| 165 |  |  |  |  |  |  | @_ == 3 | 
| 166 |  |  |  |  |  |  | or | 
| 167 |  |  |  |  |  |  | croak( "Wrong number of parameters in signature for %s: got %d, %s", | 
| 168 |  |  |  |  |  |  | "change_parent_dir", scalar(@_), "expected exactly 3 parameters" ); | 
| 169 |  |  |  |  |  |  |  | 
| 170 |  |  |  |  |  |  | @head = splice( @_, 0, 0 ); | 
| 171 |  |  |  |  |  |  |  | 
| 172 |  |  |  |  |  |  | # Parameter $_[0] (type: Path) | 
| 173 |  |  |  |  |  |  | $tmp = ( | 
| 174 |  |  |  |  |  |  | ( | 
| 175 |  |  |  |  |  |  | do { | 
| 176 | 1 |  |  | 1 |  | 8 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 322 |  | 
| 177 |  |  |  |  |  |  | Scalar::Util::blessed( $_[0] ) | 
| 178 |  |  |  |  |  |  | and $_[0]->isa(q[Path::Tiny]); | 
| 179 |  |  |  |  |  |  | } | 
| 180 |  |  |  |  |  |  | ) | 
| 181 |  |  |  |  |  |  | ) ? $_[0] : ( | 
| 182 |  |  |  |  |  |  | do { | 
| 183 |  |  |  |  |  |  |  | 
| 184 |  |  |  |  |  |  | package Mite::Shim; | 
| 185 |  |  |  |  |  |  | defined( $_[0] ) and do { | 
| 186 |  |  |  |  |  |  | ref( \$_[0] ) eq 'SCALAR' | 
| 187 |  |  |  |  |  |  | or ref( \( my $val = $_[0] ) ) eq 'SCALAR'; | 
| 188 |  |  |  |  |  |  | } | 
| 189 |  |  |  |  |  |  | } | 
| 190 |  |  |  |  |  |  | ) | 
| 191 |  |  |  |  |  |  | ? scalar( | 
| 192 |  |  |  |  |  |  | do { local $_ = $_[0]; Path::Tiny::path($_) } | 
| 193 |  |  |  |  |  |  | ) | 
| 194 |  |  |  |  |  |  | : ( | 
| 195 |  |  |  |  |  |  | do { | 
| 196 |  |  |  |  |  |  |  | 
| 197 |  |  |  |  |  |  | package Mite::Shim; | 
| 198 |  |  |  |  |  |  | defined( $_[0] ) && !ref( $_[0] ) | 
| 199 |  |  |  |  |  |  | or Scalar::Util::blessed( $_[0] ) && ( | 
| 200 |  |  |  |  |  |  | sub { | 
| 201 |  |  |  |  |  |  | require overload; | 
| 202 |  |  |  |  |  |  | overload::Overloaded( ref $_[0] or $_[0] ) | 
| 203 |  |  |  |  |  |  | and overload::Method( ( ref $_[0] or $_[0] ), $_[1] ); | 
| 204 |  |  |  |  |  |  | } | 
| 205 |  |  |  |  |  |  | )->( $_[0], q[""] ); | 
| 206 |  |  |  |  |  |  | } | 
| 207 |  |  |  |  |  |  | ) | 
| 208 |  |  |  |  |  |  | ? scalar( | 
| 209 |  |  |  |  |  |  | do { local $_ = $_[0]; Path::Tiny::path($_) } | 
| 210 |  |  |  |  |  |  | ) | 
| 211 |  |  |  |  |  |  | : ( ( ref( $_[0] ) eq 'ARRAY' ) ) ? scalar( | 
| 212 |  |  |  |  |  |  | do { local $_ = $_[0]; Path::Tiny::path(@$_) } | 
| 213 |  |  |  |  |  |  | ) | 
| 214 |  |  |  |  |  |  | : $_[0]; | 
| 215 |  |  |  |  |  |  | ( | 
| 216 |  |  |  |  |  |  | do { | 
| 217 | 1 |  |  | 1 |  | 8 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 6 |  | 
|  | 1 |  |  |  |  | 58 |  | 
| 218 |  |  |  |  |  |  | Scalar::Util::blessed($tmp) and $tmp->isa(q[Path::Tiny]); | 
| 219 |  |  |  |  |  |  | } | 
| 220 |  |  |  |  |  |  | ) | 
| 221 |  |  |  |  |  |  | or croak( | 
| 222 |  |  |  |  |  |  | "Type check failed in signature for change_parent_dir: %s should be %s", | 
| 223 |  |  |  |  |  |  | "\$_[0]", "Path" | 
| 224 |  |  |  |  |  |  | ); | 
| 225 |  |  |  |  |  |  | push( @out, $tmp ); | 
| 226 |  |  |  |  |  |  |  | 
| 227 |  |  |  |  |  |  | # Parameter $_[1] (type: Path) | 
| 228 |  |  |  |  |  |  | $tmp = ( | 
| 229 |  |  |  |  |  |  | ( | 
| 230 |  |  |  |  |  |  | do { | 
| 231 | 1 |  |  | 1 |  | 13 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 233 |  | 
| 232 |  |  |  |  |  |  | Scalar::Util::blessed( $_[1] ) | 
| 233 |  |  |  |  |  |  | and $_[1]->isa(q[Path::Tiny]); | 
| 234 |  |  |  |  |  |  | } | 
| 235 |  |  |  |  |  |  | ) | 
| 236 |  |  |  |  |  |  | ) ? $_[1] : ( | 
| 237 |  |  |  |  |  |  | do { | 
| 238 |  |  |  |  |  |  |  | 
| 239 |  |  |  |  |  |  | package Mite::Shim; | 
| 240 |  |  |  |  |  |  | defined( $_[1] ) and do { | 
| 241 |  |  |  |  |  |  | ref( \$_[1] ) eq 'SCALAR' | 
| 242 |  |  |  |  |  |  | or ref( \( my $val = $_[1] ) ) eq 'SCALAR'; | 
| 243 |  |  |  |  |  |  | } | 
| 244 |  |  |  |  |  |  | } | 
| 245 |  |  |  |  |  |  | ) | 
| 246 |  |  |  |  |  |  | ? scalar( | 
| 247 |  |  |  |  |  |  | do { local $_ = $_[1]; Path::Tiny::path($_) } | 
| 248 |  |  |  |  |  |  | ) | 
| 249 |  |  |  |  |  |  | : ( | 
| 250 |  |  |  |  |  |  | do { | 
| 251 |  |  |  |  |  |  |  | 
| 252 |  |  |  |  |  |  | package Mite::Shim; | 
| 253 |  |  |  |  |  |  | defined( $_[1] ) && !ref( $_[1] ) | 
| 254 |  |  |  |  |  |  | or Scalar::Util::blessed( $_[1] ) && ( | 
| 255 |  |  |  |  |  |  | sub { | 
| 256 |  |  |  |  |  |  | require overload; | 
| 257 |  |  |  |  |  |  | overload::Overloaded( ref $_[0] or $_[0] ) | 
| 258 |  |  |  |  |  |  | and overload::Method( ( ref $_[0] or $_[0] ), $_[1] ); | 
| 259 |  |  |  |  |  |  | } | 
| 260 |  |  |  |  |  |  | )->( $_[1], q[""] ); | 
| 261 |  |  |  |  |  |  | } | 
| 262 |  |  |  |  |  |  | ) | 
| 263 |  |  |  |  |  |  | ? scalar( | 
| 264 |  |  |  |  |  |  | do { local $_ = $_[1]; Path::Tiny::path($_) } | 
| 265 |  |  |  |  |  |  | ) | 
| 266 |  |  |  |  |  |  | : ( ( ref( $_[1] ) eq 'ARRAY' ) ) ? scalar( | 
| 267 |  |  |  |  |  |  | do { local $_ = $_[1]; Path::Tiny::path(@$_) } | 
| 268 |  |  |  |  |  |  | ) | 
| 269 |  |  |  |  |  |  | : $_[1]; | 
| 270 |  |  |  |  |  |  | ( | 
| 271 |  |  |  |  |  |  | do { | 
| 272 | 1 |  |  | 1 |  | 8 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 97 |  | 
| 273 |  |  |  |  |  |  | Scalar::Util::blessed($tmp) and $tmp->isa(q[Path::Tiny]); | 
| 274 |  |  |  |  |  |  | } | 
| 275 |  |  |  |  |  |  | ) | 
| 276 |  |  |  |  |  |  | or croak( | 
| 277 |  |  |  |  |  |  | "Type check failed in signature for change_parent_dir: %s should be %s", | 
| 278 |  |  |  |  |  |  | "\$_[1]", "Path" | 
| 279 |  |  |  |  |  |  | ); | 
| 280 |  |  |  |  |  |  | push( @out, $tmp ); | 
| 281 |  |  |  |  |  |  |  | 
| 282 |  |  |  |  |  |  | # Parameter $_[2] (type: Path) | 
| 283 |  |  |  |  |  |  | $tmp = ( | 
| 284 |  |  |  |  |  |  | ( | 
| 285 |  |  |  |  |  |  | do { | 
| 286 | 1 |  |  | 1 |  | 7 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 234 |  | 
| 287 |  |  |  |  |  |  | Scalar::Util::blessed( $_[2] ) | 
| 288 |  |  |  |  |  |  | and $_[2]->isa(q[Path::Tiny]); | 
| 289 |  |  |  |  |  |  | } | 
| 290 |  |  |  |  |  |  | ) | 
| 291 |  |  |  |  |  |  | ) ? $_[2] : ( | 
| 292 |  |  |  |  |  |  | do { | 
| 293 |  |  |  |  |  |  |  | 
| 294 |  |  |  |  |  |  | package Mite::Shim; | 
| 295 |  |  |  |  |  |  | defined( $_[2] ) and do { | 
| 296 |  |  |  |  |  |  | ref( \$_[2] ) eq 'SCALAR' | 
| 297 |  |  |  |  |  |  | or ref( \( my $val = $_[2] ) ) eq 'SCALAR'; | 
| 298 |  |  |  |  |  |  | } | 
| 299 |  |  |  |  |  |  | } | 
| 300 |  |  |  |  |  |  | ) | 
| 301 |  |  |  |  |  |  | ? scalar( | 
| 302 |  |  |  |  |  |  | do { local $_ = $_[2]; Path::Tiny::path($_) } | 
| 303 |  |  |  |  |  |  | ) | 
| 304 |  |  |  |  |  |  | : ( | 
| 305 |  |  |  |  |  |  | do { | 
| 306 |  |  |  |  |  |  |  | 
| 307 |  |  |  |  |  |  | package Mite::Shim; | 
| 308 |  |  |  |  |  |  | defined( $_[2] ) && !ref( $_[2] ) | 
| 309 |  |  |  |  |  |  | or Scalar::Util::blessed( $_[2] ) && ( | 
| 310 |  |  |  |  |  |  | sub { | 
| 311 |  |  |  |  |  |  | require overload; | 
| 312 |  |  |  |  |  |  | overload::Overloaded( ref $_[0] or $_[0] ) | 
| 313 |  |  |  |  |  |  | and overload::Method( ( ref $_[0] or $_[0] ), $_[1] ); | 
| 314 |  |  |  |  |  |  | } | 
| 315 |  |  |  |  |  |  | )->( $_[2], q[""] ); | 
| 316 |  |  |  |  |  |  | } | 
| 317 |  |  |  |  |  |  | ) | 
| 318 |  |  |  |  |  |  | ? scalar( | 
| 319 |  |  |  |  |  |  | do { local $_ = $_[2]; Path::Tiny::path($_) } | 
| 320 |  |  |  |  |  |  | ) | 
| 321 |  |  |  |  |  |  | : ( ( ref( $_[2] ) eq 'ARRAY' ) ) ? scalar( | 
| 322 |  |  |  |  |  |  | do { local $_ = $_[2]; Path::Tiny::path(@$_) } | 
| 323 |  |  |  |  |  |  | ) | 
| 324 |  |  |  |  |  |  | : $_[2]; | 
| 325 |  |  |  |  |  |  | ( | 
| 326 |  |  |  |  |  |  | do { | 
| 327 | 1 |  |  | 1 |  | 7 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 253 |  | 
| 328 |  |  |  |  |  |  | Scalar::Util::blessed($tmp) and $tmp->isa(q[Path::Tiny]); | 
| 329 |  |  |  |  |  |  | } | 
| 330 |  |  |  |  |  |  | ) | 
| 331 |  |  |  |  |  |  | or croak( | 
| 332 |  |  |  |  |  |  | "Type check failed in signature for change_parent_dir: %s should be %s", | 
| 333 |  |  |  |  |  |  | "\$_[2]", "Path" | 
| 334 |  |  |  |  |  |  | ); | 
| 335 |  |  |  |  |  |  | push( @out, $tmp ); | 
| 336 |  |  |  |  |  |  |  | 
| 337 |  |  |  |  |  |  | do { @_ = ( @head, @out ); goto $__NEXT__ }; | 
| 338 |  |  |  |  |  |  | }; | 
| 339 |  |  |  |  |  |  |  | 
| 340 |  |  |  |  |  |  | $SIGNATURE_FOR{"fix_pm_to_blib"} = sub { | 
| 341 |  |  |  |  |  |  | my $__NEXT__ = shift; | 
| 342 |  |  |  |  |  |  |  | 
| 343 |  |  |  |  |  |  | my ( @out, %tmp, $tmp, $dtmp, @head ); | 
| 344 |  |  |  |  |  |  |  | 
| 345 |  |  |  |  |  |  | @_ == 3 | 
| 346 |  |  |  |  |  |  | or | 
| 347 |  |  |  |  |  |  | croak( "Wrong number of parameters in signature for %s: got %d, %s", | 
| 348 |  |  |  |  |  |  | "fix_pm_to_blib", scalar(@_), "expected exactly 3 parameters" ); | 
| 349 |  |  |  |  |  |  |  | 
| 350 |  |  |  |  |  |  | @head = splice( @_, 0, 1 ); | 
| 351 |  |  |  |  |  |  |  | 
| 352 |  |  |  |  |  |  | # Parameter invocant (type: Defined) | 
| 353 |  |  |  |  |  |  | ( defined( $head[0] ) ) | 
| 354 |  |  |  |  |  |  | or croak( | 
| 355 |  |  |  |  |  |  | "Type check failed in signature for fix_pm_to_blib: %s should be %s", | 
| 356 |  |  |  |  |  |  | "\$_[0]", "Defined" | 
| 357 |  |  |  |  |  |  | ); | 
| 358 |  |  |  |  |  |  |  | 
| 359 |  |  |  |  |  |  | # Parameter $_[0] (type: Path) | 
| 360 |  |  |  |  |  |  | $tmp = ( | 
| 361 |  |  |  |  |  |  | ( | 
| 362 |  |  |  |  |  |  | do { | 
| 363 | 1 |  |  | 1 |  | 8 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 267 |  | 
| 364 |  |  |  |  |  |  | Scalar::Util::blessed( $_[0] ) | 
| 365 |  |  |  |  |  |  | and $_[0]->isa(q[Path::Tiny]); | 
| 366 |  |  |  |  |  |  | } | 
| 367 |  |  |  |  |  |  | ) | 
| 368 |  |  |  |  |  |  | ) ? $_[0] : ( | 
| 369 |  |  |  |  |  |  | do { | 
| 370 |  |  |  |  |  |  |  | 
| 371 |  |  |  |  |  |  | package Mite::Shim; | 
| 372 |  |  |  |  |  |  | defined( $_[0] ) and do { | 
| 373 |  |  |  |  |  |  | ref( \$_[0] ) eq 'SCALAR' | 
| 374 |  |  |  |  |  |  | or ref( \( my $val = $_[0] ) ) eq 'SCALAR'; | 
| 375 |  |  |  |  |  |  | } | 
| 376 |  |  |  |  |  |  | } | 
| 377 |  |  |  |  |  |  | ) | 
| 378 |  |  |  |  |  |  | ? scalar( | 
| 379 |  |  |  |  |  |  | do { local $_ = $_[0]; Path::Tiny::path($_) } | 
| 380 |  |  |  |  |  |  | ) | 
| 381 |  |  |  |  |  |  | : ( | 
| 382 |  |  |  |  |  |  | do { | 
| 383 |  |  |  |  |  |  |  | 
| 384 |  |  |  |  |  |  | package Mite::Shim; | 
| 385 |  |  |  |  |  |  | defined( $_[0] ) && !ref( $_[0] ) | 
| 386 |  |  |  |  |  |  | or Scalar::Util::blessed( $_[0] ) && ( | 
| 387 |  |  |  |  |  |  | sub { | 
| 388 |  |  |  |  |  |  | require overload; | 
| 389 |  |  |  |  |  |  | overload::Overloaded( ref $_[0] or $_[0] ) | 
| 390 |  |  |  |  |  |  | and overload::Method( ( ref $_[0] or $_[0] ), $_[1] ); | 
| 391 |  |  |  |  |  |  | } | 
| 392 |  |  |  |  |  |  | )->( $_[0], q[""] ); | 
| 393 |  |  |  |  |  |  | } | 
| 394 |  |  |  |  |  |  | ) | 
| 395 |  |  |  |  |  |  | ? scalar( | 
| 396 |  |  |  |  |  |  | do { local $_ = $_[0]; Path::Tiny::path($_) } | 
| 397 |  |  |  |  |  |  | ) | 
| 398 |  |  |  |  |  |  | : ( ( ref( $_[0] ) eq 'ARRAY' ) ) ? scalar( | 
| 399 |  |  |  |  |  |  | do { local $_ = $_[0]; Path::Tiny::path(@$_) } | 
| 400 |  |  |  |  |  |  | ) | 
| 401 |  |  |  |  |  |  | : $_[0]; | 
| 402 |  |  |  |  |  |  | ( | 
| 403 |  |  |  |  |  |  | do { | 
| 404 | 1 |  |  | 1 |  | 7 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 66 |  | 
| 405 |  |  |  |  |  |  | Scalar::Util::blessed($tmp) and $tmp->isa(q[Path::Tiny]); | 
| 406 |  |  |  |  |  |  | } | 
| 407 |  |  |  |  |  |  | ) | 
| 408 |  |  |  |  |  |  | or croak( | 
| 409 |  |  |  |  |  |  | "Type check failed in signature for fix_pm_to_blib: %s should be %s", | 
| 410 |  |  |  |  |  |  | "\$_[1]", "Path" | 
| 411 |  |  |  |  |  |  | ); | 
| 412 |  |  |  |  |  |  | push( @out, $tmp ); | 
| 413 |  |  |  |  |  |  |  | 
| 414 |  |  |  |  |  |  | # Parameter $_[1] (type: Path) | 
| 415 |  |  |  |  |  |  | $tmp = ( | 
| 416 |  |  |  |  |  |  | ( | 
| 417 |  |  |  |  |  |  | do { | 
| 418 | 1 |  |  | 1 |  | 7 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 228 |  | 
| 419 |  |  |  |  |  |  | Scalar::Util::blessed( $_[1] ) | 
| 420 |  |  |  |  |  |  | and $_[1]->isa(q[Path::Tiny]); | 
| 421 |  |  |  |  |  |  | } | 
| 422 |  |  |  |  |  |  | ) | 
| 423 |  |  |  |  |  |  | ) ? $_[1] : ( | 
| 424 |  |  |  |  |  |  | do { | 
| 425 |  |  |  |  |  |  |  | 
| 426 |  |  |  |  |  |  | package Mite::Shim; | 
| 427 |  |  |  |  |  |  | defined( $_[1] ) and do { | 
| 428 |  |  |  |  |  |  | ref( \$_[1] ) eq 'SCALAR' | 
| 429 |  |  |  |  |  |  | or ref( \( my $val = $_[1] ) ) eq 'SCALAR'; | 
| 430 |  |  |  |  |  |  | } | 
| 431 |  |  |  |  |  |  | } | 
| 432 |  |  |  |  |  |  | ) | 
| 433 |  |  |  |  |  |  | ? scalar( | 
| 434 |  |  |  |  |  |  | do { local $_ = $_[1]; Path::Tiny::path($_) } | 
| 435 |  |  |  |  |  |  | ) | 
| 436 |  |  |  |  |  |  | : ( | 
| 437 |  |  |  |  |  |  | do { | 
| 438 |  |  |  |  |  |  |  | 
| 439 |  |  |  |  |  |  | package Mite::Shim; | 
| 440 |  |  |  |  |  |  | defined( $_[1] ) && !ref( $_[1] ) | 
| 441 |  |  |  |  |  |  | or Scalar::Util::blessed( $_[1] ) && ( | 
| 442 |  |  |  |  |  |  | sub { | 
| 443 |  |  |  |  |  |  | require overload; | 
| 444 |  |  |  |  |  |  | overload::Overloaded( ref $_[0] or $_[0] ) | 
| 445 |  |  |  |  |  |  | and overload::Method( ( ref $_[0] or $_[0] ), $_[1] ); | 
| 446 |  |  |  |  |  |  | } | 
| 447 |  |  |  |  |  |  | )->( $_[1], q[""] ); | 
| 448 |  |  |  |  |  |  | } | 
| 449 |  |  |  |  |  |  | ) | 
| 450 |  |  |  |  |  |  | ? scalar( | 
| 451 |  |  |  |  |  |  | do { local $_ = $_[1]; Path::Tiny::path($_) } | 
| 452 |  |  |  |  |  |  | ) | 
| 453 |  |  |  |  |  |  | : ( ( ref( $_[1] ) eq 'ARRAY' ) ) ? scalar( | 
| 454 |  |  |  |  |  |  | do { local $_ = $_[1]; Path::Tiny::path(@$_) } | 
| 455 |  |  |  |  |  |  | ) | 
| 456 |  |  |  |  |  |  | : $_[1]; | 
| 457 |  |  |  |  |  |  | ( | 
| 458 |  |  |  |  |  |  | do { | 
| 459 | 1 |  |  | 1 |  | 8 | use Scalar::Util (); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 145 |  | 
| 460 |  |  |  |  |  |  | Scalar::Util::blessed($tmp) and $tmp->isa(q[Path::Tiny]); | 
| 461 |  |  |  |  |  |  | } | 
| 462 |  |  |  |  |  |  | ) | 
| 463 |  |  |  |  |  |  | or croak( | 
| 464 |  |  |  |  |  |  | "Type check failed in signature for fix_pm_to_blib: %s should be %s", | 
| 465 |  |  |  |  |  |  | "\$_[2]", "Path" | 
| 466 |  |  |  |  |  |  | ); | 
| 467 |  |  |  |  |  |  | push( @out, $tmp ); | 
| 468 |  |  |  |  |  |  |  | 
| 469 |  |  |  |  |  |  | do { @_ = ( @head, @out ); goto $__NEXT__ }; | 
| 470 |  |  |  |  |  |  | }; | 
| 471 |  |  |  |  |  |  |  | 
| 472 |  |  |  |  |  |  | 1; | 
| 473 |  |  |  |  |  |  | } |