<br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 11:45 AM, Jeffrey Thalhammer <span dir="ltr"><<a href="mailto:jeff@imaginative-software.com" target="_blank">jeff@imaginative-software.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br><div><div>Side note:  I've been hanging out on the #moose channel lately.  Apparently, lazy_build is out of fashion, because it also generates a predicate and clearer method for you, which you probably didn't want.  So now the recommended practice is... </div>


</div></div><div><br></div><div>has id => ( lazy => 1,  builder => '_build_id' );</div><div><br></div><div>I think lazy_build will be removed from the documentation in the next release of Moose.</div></div>


</blockquote><div><br></div><div>Seems to still be there in the lates trial release from a day or so ago, but there is now a note in the Best Practices docs. </div><div><br></div><div>The reasoning is because it automatically creates (possibly undocumented) methods that someone might use in your public API that might not be part of the test suite? </div>


<div><br></div><div>I used to specify "builder" but got caught leaving out the lazy => 1 a few times, and quite a few times typed the builder method name incorrectly. And I also missed the predicate that I use, if only infrequently.  And there's a lot to be said for laziness. </div>

<div><br></div><div>Time to start using MooseX::AttributeShortcuts, indeed.</div>
<div><br></div></div><div><br></div>-- <br>Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a><br>