Lint-like program for Perl?

前端 未结 4 1679
天命终不由人
天命终不由人 2021-02-07 01:38

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;
<         


        
4条回答
  •  我在风中等你
    2021-02-07 02:20

    Use B::Lint. You can use it on command line by calling O module with Lint as argument, e.g.:

    you@there:~/sandbox$ perl -MO=Lint Some.pm 
    Implicit scalar context for array in logical and (&&) at Some.pm line 121
    Implicit scalar context for array in conditional expression at Some.pm line 49
    Implicit scalar context for array in logical and (&&) at Some.pm line 132
    Some.pm syntax OK
    

提交回复
热议问题