Subject: | False positive in ErrorHandling::RequireCarping |
The ErrorHandling::RequireCarping policy (with allow_messages_ending_with_newlines
activated) complains about a terminal literal linefeed in a qq{} block. I believe this is a
common and useful construct for programs giving usage information, for example, like so:
die qq{A horrible death
};
Here's a patch to the Perl::Critic 1.03 test suite which reveals the problem:
--- t/ErrorHandling/RequireCarping.run~ 2007-02-13 14:32:46.000000000 -0500
+++ t/ErrorHandling/RequireCarping.run 2007-02-20 00:18:24.912784000 -0500
@@ -117,6 +117,8 @@
## failures 0
## cut
+die qq{A horrible death
+} ;
die "A horrible death\n" ;
die "A horrible death\n" # last statement doesn't need a terminator