Support the global destruction flag in DEMOLISH()
[gitmo/Mouse.git] / lib / Mouse / PurePerl.pm
index f6c5e5b..802289d 100644 (file)
@@ -627,7 +627,7 @@ sub DESTROY {
                 my $demolish = Mouse::Util::get_code_ref($class, 'DEMOLISH')
                     || next;
 
-                $self->$demolish();
+                $self->$demolish($Mouse::Util::in_global_destruction);
             }
         };
         $@;