Subject: | CodeLayout::RequireTrailingCommaAtNewline - suggest excluding single-element lists, or here documents |
CodeLayout::RequireTrailingCommaAtNewline is a useful policy but it might make more sense for it only to fire on lists of two or more elements. Alternatively it could avoid suggesting adding a comma after a 'here document', which gets awkward.
Otherwise you get warnings for code like
$dbh->prepare(<<END
some sql statement
goes here...
END
);
Admittedly not very pretty code, but it wouldn't be improved by adding a trailing comma.