News for hackers. Stuff that matters.
Re:An experiment-driven guide to Perl by perigrin on Tuesday February 11, 2014 @08:58PM (#7221996)
You may not realized that's what you saw, but for example all of the Moose documentation uses effectively a nested param:

    has foo => ( is => 'ro' );
is equivalent to:

    has('foo', ('is', 'ro'));
because Moose's `has` sugar is written as a exported function.
Re:An experiment-driven guide to Perl by theOnliest on Wednesday February 12, 2014 @07:01AM (#7223832)
That's true, but I've never actually seen anyone call 'has' like that. Plus, Perl's behavior on lists makes sense (always flatten) if there's no mucking around with prototypes, so that's much less confusing than the behavior in the article.
Re:An experiment-driven guide to Perl by perigrin on Wednesday February 12, 2014 @01:21PM (#7226165)
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.
Re:An experiment-driven guide to Perl by theOnliest on Wednesday February 12, 2014 @02:11PM (#7226531)
Sorry, 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!