Perl supports a -x command line option that was originally intended for saved emails containing a perl script. When perl is invoked with the -x option, it scans the file for a #!perl line and treats that as the first line of the script. The related #line option allows the line number to be reset so perl can report line numbers from an arbitrary offset in the file. In our environment, we frequently need to source shell configuration files before starting a perl script. The -x functionality allows us to combine the setup shell script and the perl script in a single file; we call this a shell springboard. Because PPI doesn't understand the -x option or the #!perl functionality, when perlcritic is run on a script using a ksh springboard, the script generally gets confused and starts reporting rather inaccurate messages. For example, in the attached script, perlcritic reports "code before use strict" and "mismatched operator" where it really complains about the ksh code leading up to the perl script. The request: make PPI and perlcritic support this, either through some sort of -x option or by recognizing the #!perl line.
Message body not shown because it is not plain text.