| 1 | package TUI::toolkit::UO::Base; | ||||||||||||||||||||
| 2 | # ABSTRACT: Derived UNIVERSAL::Object class for TUI::toolkit | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 115 | ▶ | use 5.008; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 115 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 115 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 115 | our $VERSION = '0.02'; | |||||||||||||||||||
| 9 | 115 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 115 | ▶ | use Hash::Util (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | 115 | ▶ | use UNIVERSAL::Object; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 115 | ▶ | BEGIN { require Devel::GlobalDestruction unless $] >= 5.014 } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||
| 15 | 115 | ▶ | BEGIN { $] >= 5.010 ? require mro : require MRO::Compat } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 115 | our @ISA; | |||||||||||||||||||
| 18 | 115 | ▶ | BEGIN { @ISA = ( 'UNIVERSAL::Object' ) } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 54 | ▶ | sub DESTROY { | ||||||||||||||||||
|
Subroutine
DESTROY: called CC=4 SCAR=14.0
| |||||||||||||||||||||
| 21 | 54 | my $self = shift; | |||||||||||||||||||
| 22 | 54 | ▶ | my $class = ref $self || $self; | ||||||||||||||||||
|
Condition33%1/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table33%1/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 54 | Hash::Util::unlock_keys( %$self ); | |||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 54 | ▶ | my $in_global_destruction = defined ${^GLOBAL_PHASE} | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 27 | ? ${^GLOBAL_PHASE} eq 'DESTRUCT' | ||||||||||||||||||||
| 28 | : Devel::GlobalDestruction::in_global_destruction(); | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | # Call all DEMOLISH methods starting with the derived classes. | ||||||||||||||||||||
| 31 | DEMOLISHALL: { | ||||||||||||||||||||
| 32 | 115 | ▶ | no strict 'refs'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 33 | map { | ||||||||||||||||||||
| 34 | 223 | my $demolish = *{ $_ . '::DEMOLISH' }{CODE}; | |||||||||||||||||||
| 35 | 223 | ▶ | $demolish->( $self, $in_global_destruction ) if $demolish; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 36 | 54 | } @{ mro::get_linear_isa( $class ) }; | |||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | 54 | return; | |||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 115 | 1 | |||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | __END__ | ||||||||||||||||||||