X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FDestructor.pm;h=b91ed2ae5e61d1bbb777833560b1b87d04a1b09b;hb=4aaed9e5cc435a2085e46f4c98a3abc233ecacaf;hp=72de160866da5ae30a4bef323745964de6f5b426;hpb=4c0fe06fa87e7c2c4ed1666e77ed52ae020f19d7;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Method/Destructor.pm b/lib/Mouse/Meta/Method/Destructor.pm index 72de160..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.41 +This document describes Mouse version 0.50_02 =head1 SEE ALSO