Lint-like program for Perl?
问题 I'm looking for a lint for Perl, something that would catch dead code and other potential problems. Any suggestions? I have use strict; use warnings; already but I'd like to have more. 回答1: Perl doesn't have a direct equivalent to lint. A large part of the reason for that is that Perl doesn't provide quite as many ways to hang yourself as C does. The basic version of "lint" for Perl is this: perl -Mstrict [-Mdiagnostics] -cw <file> This causes perl to compile (but not run) the specified file