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=3ce7d27e54ef9030608c1ec16dd2e4efedb26c8d;hp=61ab200db067a191159af5d8ecc3ef6a6a70911d;hb=f7e41edaceee0d549a2d664378cfcf85dcf9454b;hpb=b842ace0d446cc7e87c823e72fd74f68d495142b diff --git a/lib/Mouse/Meta/Method/Destructor.pm b/lib/Mouse/Meta/Method/Destructor.pm index 61ab200..3ce7d27 100644 --- a/lib/Mouse/Meta/Method/Destructor.pm +++ b/lib/Mouse/Meta/Method/Destructor.pm @@ -12,9 +12,7 @@ sub _generate_destructor{ my $demolishall = ''; for my $class ($metaclass->linearized_isa) { - no strict 'refs'; - no warnings 'once'; - if (*{$class . '::DEMOLISH'}{CODE}) { + if (Mouse::Util::get_code_ref($class, 'DEMOLISH')) { $demolishall .= "${class}::DEMOLISH(\$self);\n"; } } @@ -55,7 +53,7 @@ Mouse::Meta::Method::Destructor - A Mouse method generator for destructors =head1 VERSION -This document describes Mouse version 0.40 +This document describes Mouse version 0.40_08 =head1 SEE ALSO