From: Dave Rolsky <autarch@urth.org> Date: Fri, 13 Feb 2009 16:01:48 +0000 (+0000) Subject: Mention that you can override new if your parent is not a Moose::Object X-Git-Tag: 0.70~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46c52442538cebcfa4bec51258bf5d14e60c7924;p=gitmo%2FMoose.git Mention that you can override new if your parent is not a Moose::Object --- diff --git a/lib/Moose/Manual/BestPractices.pod b/lib/Moose/Manual/BestPractices.pod index 0c74d75..691f7d0 100644 --- a/lib/Moose/Manual/BestPractices.pod +++ b/lib/Moose/Manual/BestPractices.pod @@ -42,10 +42,10 @@ C<BUILD> or C<BUILDARGS> methods to do the same thing. When you override C<new>, Moose can no longer inline a constructor when your class is immutabilized. -The only reason to override C<new> is if you are writing a MooseX -extension that provides its own L<Moose::Object> subclass I<and> a -subclass of L<Moose::Meta::Method::Constructor> to inline the -constructor. +There are two good reasons to override C<new>. One, you are writing a +MooseX extension that provides its own L<Moose::Object> subclass +I<and> a subclass of L<Moose::Meta::Method::Constructor> to inline the +constructor. Two, you are subclassing a non-Moose parent. If you know how to do that, you know when to ignore this best practice ;)