[sf-perl] the mouse with antlers

Bill Moseley moseley at hank.org
Wed Apr 4 18:21:02 PDT 2012

On Thu, Apr 5, 2012 at 9:01 AM, Bill Moseley <moseley at hank.org> wrote:

>> I find myself worrying about what I would do if I needed more than two
>> stages, instantiation and lazy access.  Like what if I wanted to put
>> the id in the subject?
Oops, speaking of lazy...

> has id => ( lazy_build => 1, ... );

sub _build_id { return shift->id_by_name }

where that method looks up the name, for example, in %name_to_id_map.

Might make the name attribute have a type limited to values in

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20120405/6d945dec/attachment.html>

More information about the SanFrancisco-pm mailing list