in reply to Proper handling of shebang line while performing local testing?

You mentioned that you're using distzilla. This presents a potential solution: Write your code with #!/usr/bin/env/perl (so that it works with your local tests) and then use a distzilla plugin to rewrite the Perl files while they're being packaged for distribution, changing #!/usr/bin/env/perl to #!/usr/bin/perl (so that the distributed files will be CPAN-correct according to your "someone").

To the best of my knowledge, such a distzilla plugin does not currently exist, but it's a simple enough task (run one regex substitution on the first line of each file) that writing one should be relatively straightforward.

Replies are listed 'Best First'.
Re^2: Proper handling of shebang line while performing local testing?
by Anonymous Monk on Sep 19, 2018 at 17:53 UTC
    This should not be needed. When testing locally just use invocations like prove -lr t/ and perl script/foo.pl so that the shebangs are not used. There is another underlying issue here.
      Er, perl -Ilib script/foo.pl