in reply to Re^4: Perl syntax checking without `perl -c` (bareword)
in thread Perl syntax checking without `perl -c`

"So for completeness: ..."

The following is somewhat negative information, but perhaps useful to know for someone coming to this thread in the future.

I had previously done an internet search for "perl lint". I came across these two modules:

B::Lint

In its raw form (i.e. perl -MO=Lint file_with_perl_code) this seemed to act pretty much identically to perl -c file_with_perl_code. It does have a number of options but none turn off executing code.

Perl::Lint

I think this falls into the category of abandonware: not touched in over four years; about 95% of testers failed to install the module; dead link to TPF grant proposal.

I did manage to force-install it; however, running it with my $work code produced errors (related to Perl::Lint code). I created a very simple bad.pl (with the typos I indicated above) purely as a test: although its SYNOPSIS shows running it on a bar.pl file, it complained about no package declaration; not ending with 1;; and other things which suggest the code only works on modules, not scripts.

— Ken