Perl shallow syntax check? ie. do not check syntax of imports

前端 未结 5 2253
一个人的身影
一个人的身影 2021-02-15 14:38

How can I perform a \"shallow\" syntax check on perl files. The standard perl -c is useful but it checks the syntax of imports. This is sometimes nice but not great

5条回答
  •  暖寄归人
    2021-02-15 14:52

    I would suggest that it's better to include your code repository in your syntax check. perl -I/path/to/working/code/repo/local_perl/ -c or set PERL5LIB=/path/to/working/code/repo/local_perl/ prior to running perl -c. Either option should allow you to check against your working code, assuming you have it in a directory structure similar to your live code.

提交回复
热议问题