| 1 | package Moo::HandleMoose::FakeMetaClass; | ||||||||||||||||||||||||||||
| 2 | 44 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 44 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 44 | ▶ | use Carp (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 44 | ▶ | BEGIN { our @CARP_NOT = qw(Moo::HandleMoose) } | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | sub DESTROY { } | ||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 69 | ▶ | sub AUTOLOAD { | ||||||||||||||||||||||||||
|
Subroutine
AUTOLOAD: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||
| 11 | 69 | my ($meth) = (our $AUTOLOAD =~ /([^:]+)$/); | |||||||||||||||||||||||||||
| 12 | 69 | my $self = shift; | |||||||||||||||||||||||||||
| 13 | 69 | ▶ | Carp::croak "Can't call $meth without object instance" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 14 | if !ref $self; | ||||||||||||||||||||||||||||
| 15 | 67 | ▶ | Carp::croak "Can't inflate Moose metaclass with Moo::sification disabled" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | if $Moo::sification::disabled; | ||||||||||||||||||||||||||||
| 17 | 65 | require Moo::HandleMoose; | |||||||||||||||||||||||||||
| 18 | 65 | Moo::HandleMoose::inject_real_metaclass_for($self->{name})->$meth(@_) | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | 20 | ▶ | sub can { | ||||||||||||||||||||||||||
|
Subroutine
can: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 21 | 20 | my $self = shift; | |||||||||||||||||||||||||||
| 22 | 20 | ▶ | return $self->SUPER::can(@_) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not ref $self or $Moo::sification::disabled
MC/DC100%2/2
not ref $self or $Moo::sification::disabled
not ref $self
$Moo::sification::disabled
Truth table100%3/3
not(A) or B
A= not ref $selfB= $Moo::sification::disabled
| |||||||||||||||||||||||||||||
| 23 | if !ref $self or $Moo::sification::disabled; | ||||||||||||||||||||||||||||
| 24 | 16 | require Moo::HandleMoose; | |||||||||||||||||||||||||||
| 25 | 16 | Moo::HandleMoose::inject_real_metaclass_for($self->{name})->can(@_) | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | 46 | ▶ | sub isa { | ||||||||||||||||||||||||||
|
Subroutine
isa: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 28 | 46 | my $self = shift; | |||||||||||||||||||||||||||
| 29 | 46 | ▶ | return $self->SUPER::isa(@_) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not ref $self or $Moo::sification::disabled
MC/DC100%2/2
not ref $self or $Moo::sification::disabled
not ref $self
$Moo::sification::disabled
Truth table100%3/3
not(A) or B
A= not ref $selfB= $Moo::sification::disabled
| |||||||||||||||||||||||||||||
| 30 | if !ref $self or $Moo::sification::disabled; | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | # prevent inflation by Devel::StackTrace, which does this check. examining | ||||||||||||||||||||||||||||
| 33 | # the stack trace in an exception from inflation could re-trigger inflation | ||||||||||||||||||||||||||||
| 34 | # and cause another exception. | ||||||||||||||||||||||||||||
| 35 | 44 | ▶ | return !!0 | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@_ == 1 and $_[0] eq "Exception::Class::Base"
MC/DC50%1/2
@_ == 1 and $_[0] eq "Exception::Class::Base"
@_ == 1
$_[0] eq "Exception::Class::Base"
Truth table66%2/3
A and B
A= @_ == 1B= $_[0] eq "Exception::Class::Base"
| |||||||||||||||||||||||||||||
| 36 | if @_ == 1 && $_[0] eq 'Exception::Class::Base'; | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 41 | require Moo::HandleMoose; | |||||||||||||||||||||||||||
| 39 | 41 | Moo::HandleMoose::inject_real_metaclass_for($self->{name})->isa(@_) | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | 3 | ▶ | sub make_immutable { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
make_immutable: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 44 | 1; | |||||||||||||||||||||||||||