From: Shawn M Moore Date: Tue, 28 Apr 2009 09:25:36 +0000 (-0400) Subject: Throw an error by default for violates_metaclass X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b971d8fa31da3513e9d09a50ede907ba19bd8456;p=gitmo%2FPerl-Critic-Dynamic-Moose.git Throw an error by default for violates_metaclass --- diff --git a/lib/Perl/Critic/Policy/DynamicMoose.pm b/lib/Perl/Critic/Policy/DynamicMoose.pm index 888ff73..303e249 100644 --- a/lib/Perl/Critic/Policy/DynamicMoose.pm +++ b/lib/Perl/Critic/Policy/DynamicMoose.pm @@ -58,6 +58,8 @@ sub violates_dynamic { return @violations; } +sub violates_metaclass { die "Your policy (" . blessed($_[0]) . ") needs to implement violates_metaclass" } + sub _compile_document { my $self = shift; my $doc = $self->document;