On 30.9.2010 22:34, Sir Robert Burbridge wrote:
On 09/30/2010 02:35 PM, Hans Dieter Pearcey wrote:
Anyway, we were kicking around ideas for how to get rid of these
clearers and
predicates in #moose-dev. I suggested 3 things:
1) reuse 'builder', i.e. 'builder => 1' is special cased to be the
same as
'builder => "_build_$attr"'
The first few times I used moose, I intuitively did "builder => 1" to
mean "expect a builder called _build_$attribute". For no good reason
it didn't ever occur to me I'd want a builder that was named
differently (obscurely?). I realize the "having to change your code
for no good reason" isn't awesome, but it *would* make their code more
readily accessible to declare those explicitly.
To me, option 1 feels more like the "clean" way to implement, if it
were being implemented from scratch; so I favor that =)
Hello,
I also favour option one. Actually that is what I most of the times do
manually as it somehow makes it mentally more clear to me. Even though I
never use any other names for builders than "_build_$attr".
Regards,
Jiri