Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Proper handling of shebang line while performing local testing?

by dsheroh (Monsignor)
on Sep 05, 2018 at 07:30 UTC ( #1221736=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1221736]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-05-21 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?