3 ms·
The first one I presented is the way the Moose documentation calls has, the way the Moose test suite typically calls has, and the way I and most of the rest of
by perigrin 13y ago
The first one I presented is the way the Moose documentation calls has, the way the Moose test suite typically calls has, and the way I and most of the rest of the Moose Cabal call has.
The second one isn't common at all, but I have seen people both completely leave out the parentheses:
has foo => is => 'ro', isa => 'Str', ...;
or treat has as a straight function
has(foo, is => 'ro', isa => 'Str');
both of which cause Perl::Tidy to do weird things.
- theOnliest 13y agoSorry, I meant I'd never seen it called the second way (nested parens). I also haven't seen the no-parens version, which looks really bizarre!