Scalar-Random-PP

 view release on metacpan or  search on metacpan

lib/Scalar/Random/PP/OO.pm  view on Meta::CPAN


	return if $Scalar::Random::PP::OO::Util::in_global_destruction;

	my $serial_id = $self->{anon_serial_id};

	return if !$serial_id;
	# mortal anonymous class

	# XXX: cleaning stash with threads causes panic/SEGV.
	if(exists $INC{'threads.pm'}) {
		# (caller)[2] indicates the caller's line number,
		# which is zero when the current thread is joining.
		return if( (caller)[2] == 0);
	}

	# @ISA is a magical variable, so we clear it manually.
	@{$self->{superclasses}} = () if exists $self->{superclasses};

	# Then, clear the symbol table hash
	%{$self->namespace} = ();

	my $name = $self->name;
	delete $METAS{$name};



( run in 1.480 second using v1.01-cache-2.11-cpan-a3c8064c92c )