| 1 | package MouseX::Foreign::Meta::Role::Method::Destructor; | ||||||||||||||
| 2 | 4 | ▶ | use Mouse::Role; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | |||||||||||||||
| 4 | 7 | ▶ | around _generate_destructor => sub { | ||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.8
| |||||||||||||||
| 5 | 7 | my($next, undef, $meta) = @_; | |||||||||||||
| 6 | |||||||||||||||
| 7 | 7 | my $foreign_superclass = $meta->foreign_superclass; | |||||||||||||
| 8 | |||||||||||||||
| 9 | 7 | my $super_destroy; | |||||||||||||
| 10 | 7 | ▶ | if(!$foreign_superclass->can('DEMOLISHALL')){ | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 11 | 6 | $super_destroy = $foreign_superclass->can('DESTROY'); | |||||||||||||
| 12 | } | ||||||||||||||
| 13 | |||||||||||||||
| 14 | 6 | ▶ | return sub { | ||||||||||||
|
Subroutine
DESTROY: called CC=2 SCAR=10.1
Subroutine
__ANON__: not called CC=2 SCAR=10.1
| |||||||||||||||
| 15 | 0 | my($self) = @_; | |||||||||||||
| 16 | 0 | $self->DEMOLISHALL(); | |||||||||||||
| 17 | |||||||||||||||
| 18 | 0 | ▶ | if(defined $super_destroy) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 19 | 0 | $self->$super_destroy(); | |||||||||||||
| 20 | } | ||||||||||||||
| 21 | 0 | return; | |||||||||||||
| 22 | 7 | }; | |||||||||||||
| 23 | 3 | }; | |||||||||||||
| 24 | |||||||||||||||
| 25 | 4 | ▶ | no Mouse::Role; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 26 | 3 | 1; | |||||||||||||
| 27 | __END__ | ||||||||||||||