From: Karen Etheridge Date: Fri, 30 Mar 2012 16:33:56 +0000 (-0700) Subject: BestPractices now advises against the use of lazy_build X-Git-Tag: 2.0500~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=2d6867f9f272105ffa2f96fbe293c564adc13553 BestPractices now advises against the use of lazy_build --- diff --git a/lib/Moose/Manual/BestPractices.pod b/lib/Moose/Manual/BestPractices.pod index bdf5ffe..cccb3b0 100644 --- a/lib/Moose/Manual/BestPractices.pod +++ b/lib/Moose/Manual/BestPractices.pod @@ -102,6 +102,13 @@ by default. Predicates are less problematic, but there's no reason to make your public API bigger than it has to be. +=head2 Avoid C + +As described above, you rarely actually need a clearer or a predicate. +C adds both to your public API, which exposes you to usecases that +you must now test for. It's much better to avoid adding them until you really +need them - use explicit C and C options instead. + =head2 Default to read-only, and consider keeping writers private Making attributes mutable just means more complexity to account for in