[Moose-commits] r7652 - Moose/trunk/lib/Moose/Manual
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Fri Feb 13 16:01:48 GMT 2009
Author: autarch
Date: 2009-02-13 08:01:48 -0800 (Fri, 13 Feb 2009)
New Revision: 7652
Modified:
Moose/trunk/lib/Moose/Manual/BestPractices.pod
Log:
Mention that you can override new if your parent is not a Moose::Object
Modified: Moose/trunk/lib/Moose/Manual/BestPractices.pod
===================================================================
--- Moose/trunk/lib/Moose/Manual/BestPractices.pod 2009-02-13 15:55:16 UTC (rev 7651)
+++ Moose/trunk/lib/Moose/Manual/BestPractices.pod 2009-02-13 16:01:48 UTC (rev 7652)
@@ -42,10 +42,10 @@
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
;)
More information about the Moose-commits
mailing list