Honestly, I did almost add "but it's probably in PBP somewhere" to my previous post. :-) Thanks for the reference, though.
Note that even there it's an arbitrary distinction as perlcritic won't moan at newline-terminated warn/die calls.
$ echo 'package Foo; use strict; use warnings; warn "foo!"; 1;' | perl
+critic -3
"warn" used instead of "carp" at line 1, column 40. See page 283 of P
+BP. (Severity: 3)
$ echo 'package Foo; use strict; use warnings; warn "foo!\n"; 1;' | pe
+rlcritic -3
source OK
$
|