develooper Front page | perl.moose | Postings from April 2012

Re: Wrapping builder from attribute trait?

Thread Previous
From:
Karen Etheridge
Date:
April 27, 2012 12:30
Subject:
Re: Wrapping builder from attribute trait?
Message ID:
20120427192949.GD803@tequila.etheridge.ca
On Fri, Apr 27, 2012 at 11:24:46AM -0400, Maddy, Noel wrote:
> Handling a builder isn't quite that easy -- if the builder method is
> defined before the attribute, then it's a simple add_around_method_modifier
> in _process_options.

You can wrap Moose::Meta::Attributes::_call_builder, and its equivalent
that produces an inlined version at make_immutable time.


-- 
                 "Ill fares the land to hastening ills a prey,
                   where wealth accumulates, and men decay."
               Oliver Goldsmith (1728-1770), _Deserted Village_
            .             .            .            .             .
Karen Etheridge, karen@etheridge.ca       GCS C+++$ USL+++$ P+++$ w--- M++

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About