From: Shawn M Moore Date: Tue, 28 Apr 2009 08:48:15 +0000 (-0400) Subject: Document the hack X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0004d229e13d29a9fd2e5fe617a75aa7e3c0063f;p=gitmo%2FPerl-Critic-Dynamic-Moose.git Document the hack --- diff --git a/lib/Perl/Critic/Policy/DynamicMoose.pm b/lib/Perl/Critic/Policy/DynamicMoose.pm index 729094b..068eea3 100644 --- a/lib/Perl/Critic/Policy/DynamicMoose.pm +++ b/lib/Perl/Critic/Policy/DynamicMoose.pm @@ -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]; }