X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FDestructor.pm;h=b91ed2ae5e61d1bbb777833560b1b87d04a1b09b;hp=80569d9795f966364f9a81e20a2a5a66df9ffae8;hb=d990f7911dfd6a36d1dcc072e7adb72bf0379349;hpb=a4cbb3cb944aa43521dfa69a9f04b206c6b7a6ea diff --git a/lib/Mouse/Meta/Method/Destructor.pm b/lib/Mouse/Meta/Method/Destructor.pm index 80569d9..b91ed2a 100644 --- a/lib/Mouse/Meta/Method/Destructor.pm +++ b/lib/Mouse/Meta/Method/Destructor.pm @@ -13,7 +13,8 @@ sub _generate_destructor{ my $demolishall = ''; for my $class ($metaclass->linearized_isa) { if (Mouse::Util::get_code_ref($class, 'DEMOLISH')) { - $demolishall .= "${class}::DEMOLISH(\$self);\n"; + $demolishall .= sprintf "%s::DEMOLISH(\$self, \$Mouse::Util::in_global_destruction);\n", + $class, } } @@ -53,7 +54,7 @@ Mouse::Meta::Method::Destructor - A Mouse method generator for destructors =head1 VERSION -This document describes Mouse version 0.44 +This document describes Mouse version 0.50_02 =head1 SEE ALSO