Document the hack
[gitmo/Perl-Critic-Dynamic-Moose.git] / lib / Perl / Critic / Policy / DynamicMoose.pm
index 729094b..068eea3 100644 (file)
@@ -21,6 +21,12 @@ around violation => sub {
 
     if (!$element) {
         my $doc = $self->ppi_document;
+
+        # Without this hack, Storable complains of being unable to reconstruct
+        # overloading for an unknown package (perhaps PPI::Document?). For some
+        # reason it works for PPI::Element. Anyway, this should hopefully be
+        # replaced with a more useful location, something like
+        # ( class:MyClass / attr:foo / builder:build_foo )
         $element = $doc->find('PPI::Element')->[0];
     }