Checking in changes prior to tagging of version 0.40_09. Changelog diff is:
[gitmo/Mouse.git] / lib / Mouse / Meta / Module.pm
index bc74808..94ac4bc 100755 (executable)
@@ -6,7 +6,8 @@ use Scalar::Util ();
 
 my %METAS;
 
-if(Mouse::Util::_MOUSE_XS){
+# XXX: work around a warning "useless use of a constant in void context" in 5.6.2
+if(&Mouse::Util::MOUSE_XS){
     # register meta storage for performance
     Mouse::Util::__register_metaclass_storage(\%METAS, 0);
 
@@ -264,6 +265,8 @@ sub get_method_list {
     sub DESTROY{
         my($self) = @_;
 
+        return if $Mouse::Util::in_global_destruction;
+
         my $serial_id = $self->{anon_serial_id};
 
         return if !$serial_id;
@@ -310,7 +313,7 @@ Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Rol
 
 =head1 VERSION
 
-This document describes Mouse version 0.40_06
+This document describes Mouse version 0.40_09
 
 =head1 SEE ALSO