X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FModule.pm;h=1921ed5c6d3e36b29cc196ed1a70ecb29af0dc6f;hb=c06ab42929c96053e941120f1469aeee65e63149;hp=b1b7ab6bfc687fdafd7eb3d8b4f772936fab5351;hpb=1759509c4361c0a44d57bb501d464740247e2dc0;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index b1b7ab6..1921ed5 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -283,6 +283,13 @@ sub DESTROY{ 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}; @@ -293,7 +300,6 @@ sub DESTROY{ delete $METAS{$name}; $name =~ s/ $serial_id \z//xms; - no strict 'refs'; delete ${$name}{ $serial_id . '::' }; @@ -323,7 +329,7 @@ Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Rol =head1 VERSION -This document describes Mouse version 0.54 +This document describes Mouse version 0.66 =head1 SEE ALSO