Checking in changes prior to tagging of version 0.40_08. Changelog diff is:
[gitmo/Mouse.git] / lib / Mouse / Meta / Method / Destructor.pm
index 28e260f..3ce7d27 100644 (file)
@@ -12,8 +12,7 @@ sub _generate_destructor{
 
     my $demolishall = '';
     for my $class ($metaclass->linearized_isa) {
-        no strict 'refs';
-        if (*{$class . '::DEMOLISH'}{CODE}) {
+        if (Mouse::Util::get_code_ref($class, 'DEMOLISH')) {
             $demolishall .= "${class}::DEMOLISH(\$self);\n";
         }
     }
@@ -47,3 +46,17 @@ sub _generate_destructor{
 
 1;
 __END__
+
+=head1 NAME
+
+Mouse::Meta::Method::Destructor - A Mouse method generator for destructors
+
+=head1 VERSION
+
+This document describes Mouse version 0.40_08
+
+=head1 SEE ALSO
+
+L<Moose::Meta::Method::Destructor>
+
+=cut