What is the recommended way to package perl scripts for CPAN (and CorporatePAN)?
- by szabgab
Recently I looked at a module on CPAN that comes with a script to be installed
which made me wonder. What is the recommended way to include a script in a package
that should end up on the public CPAN and if there is any different recommendation for
packages that would be released on an in-house CPAN server?
The script starts like this:
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
Two questions
Do I understand correctly the eval part is unnecessary?
That will be embedded by the CPAN client during installation and it
will be very different when installing on Windows.
What is the recommended sh-bang line?
Would that be
#!/usr/bin/env perl
instead of the above?