Subject: | RequireTrailingCommas only at newline |
Date: | Sat, 29 Jan 2011 12:01:36 +1100 |
To: | bug-Perl-Critic [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
I find the way RequireTrailingCommas asks for
my @list = ($foo,
$bar,
$baz,);
a bit too strict. I think I prefer, in general, no comma if the closing
paren is on the same line, like
my @list = ($foo,
$bar,
$baz);
though still demand the comma if a newline like
my @list = ($foo,
$bar,
$baz,
);
What chance an option "only_at_newline" or some such name, which relaxed
to allow that "$baz);" one?
I was contemplating a separate policy called maybe something like
RequireTrailingCommasAtNewline which was the flavour I think I want, but
an option might be better.