[sf-perl] the mouse with antlers

Jeffrey Thalhammer jeff at imaginative-software.com
Wed Apr 4 20:45:21 PDT 2012

On Apr 4, 2012, at 6:01 PM, Bill Moseley wrote:

> has id => ( lazy_build => 1, ... );
> sub _build_id { return shift->name }

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... 

has id => ( lazy => 1,  builder => '_build_id' );

I think lazy_build will be removed from the documentation in the next release of Moose.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20120404/435849d2/attachment-0001.html>

More information about the SanFrancisco-pm mailing list