Mousse
view release on metacpan or search on metacpan
lib/Mousse.pm view on Meta::CPAN
sub DESTROY{
my($self) = @_;
return if $Mousse::Util::in_global_destruction;
my $serial_id = $self->{anon_serial_id};
return if !$serial_id;
# XXX: cleaning stash with threads causes panic/SEGV on legacy perls.
if(exists $INC{'threads.pm'}) {
# (caller)[2] indicates the caller's line number,
# which is zero when the current thread is joining (destroying).
return if( (caller)[2] == 0);
}
# clean up mortal anonymous class stuff
# @ISA is a magical variable, so we must clear it manually.
@{$self->{superclasses}} = () if exists $self->{superclasses};
# Then, clear the symbol table hash
%{$self->namespace} = ();
( run in 0.546 second using v1.01-cache-2.11-cpan-1e74a51a04c )