What's the most cross-platform way to execute a Perl script from Ant?
Whether you create a custom Ant goal tried to call the Perl (call it call-perl-script
), and the implementation of this task will switch to the other sub-task OS-based (eg call-perl-script-windows
, call-perl-script-osx
etc.) ..)?
Something based on this previous question or this or this ?
source to share
Windows doesn't like Perl script as executable.
Or you customize windows to execute .pl files (help ftype, help assoc)
ftype PerlScript=perl.exe %1 %*
assoc .pl=PerlScript
or you run the script via pl2bat (happens automatically if you use ExtUtils :: MakeMaker to install the script). If you are using pl2bat, review the resulting file and make sure you are satisfied with the results.
you can also use PAR / pp to create the .exe
source to share