Checking in changes prior to tagging of version 0.45. Changelog diff is:
[gitmo/Mouse.git] / lib / Mouse / Meta / Module.pm
index 93b6f68..1c5175a 100755 (executable)
@@ -89,7 +89,6 @@ sub remove_attribute  { delete $_[0]->{attributes}->{$_[1]} }
 
 sub get_attribute_list{ keys   %{$_[0]->{attributes}} }
 
-
 # XXX: for backward compatibility
 my %foreign = map{ $_ => undef } qw(
     Mouse Mouse::Role Mouse::Util Mouse::Util::TypeConstraints
@@ -265,6 +264,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;
@@ -302,7 +303,6 @@ sub throw_error{
 }
 
 1;
-
 __END__
 
 =head1 NAME
@@ -311,7 +311,7 @@ Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Rol
 
 =head1 VERSION
 
-This document describes Mouse version 0.40_08
+This document describes Mouse version 0.45
 
 =head1 SEE ALSO