X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FDestructor.pm;h=dcdda23e294bfe95fa66966d7c32f0b8697a8aa0;hb=4819ed36c693b311abb3f7d9965e1eeac1748345;hp=61ab200db067a191159af5d8ecc3ef6a6a70911d;hpb=b842ace0d446cc7e87c823e72fd74f68d495142b;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Method/Destructor.pm b/lib/Mouse/Meta/Method/Destructor.pm index 61ab200..dcdda23 100644 --- a/lib/Mouse/Meta/Method/Destructor.pm +++ b/lib/Mouse/Meta/Method/Destructor.pm @@ -1,5 +1,5 @@ package Mouse::Meta::Method::Destructor; -use Mouse::Util; # enables strict and warnings +use Mouse::Util qw(:meta); # enables strict and warnings sub _empty_DESTROY{ } @@ -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.43 =head1 SEE ALSO