NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Not Vim (Score:2)
Many attributes in a compact layout become visually disturbing. Aligning things here is a must for readability. Apparently Vim has some kind of magic I'm envious of.
No, that's just applying my default .perltidyrc.
Thanks. (Score:1)
First off, thanks for the nice review, it is good to get feedback from new Moose users. The #moose echo chamber on IRC is obviously not so helpful in this regard.
Actually the default is to not create any accessors at all. While it might seem useless, it is a perfectly valid use case, take this example for instance:
This will create a predicate method for checking if the flag is
Re: (Score:1)
Regarding "docs". Do you know of a book that may be in the works? It seems to me that Moose is such a good thing for Perl OO that it would be a good thing to have a book out there as well.
Re:Book in the works (Score:1)
Nope, not that I am involved in or have been approached about. I agree though, would be a good idea.
- Stevan
Re: (Score:1)
It differs from Perl in that it wont accept an arbitrary value and treat it as true.
That was what I was referring to. Maybe if it's advertised as these-are-the-Perl-types kind of type constraint it should actually conform to the Perl true/false idea, and if you want to stricten it up to only support 1/0/undef you use a different one (Bool vs Boolean) ?
Anyway, it surprised me when using it, that's all.
Re: (Score:1)
I think perhaps you are mistaking a "value" for the "value of an expression". When Perl sees
it evaluates
@fooas an expression, and in that context it returns true. If I were to invent a "boolean" built in similar to the "scalar" built in, which forced "boolean context", then the above code would desugar intoJust as
desugars into
Now in the context of Moose, when you assign a value to an accessor it does not impose the "b