I'm one of the Windows maintainers for the R project (an open source stats package). R allows users to build their own add-on packages; it makes use of Perl scripts to put them together.

This makes extra work for Windows users to build their packages, because they need to install Perl, set their path appropriately, etc. I'd like to simplify the process.

One suggestion from a couple of users was to use pp to convert our scripts to self-contained .exe files. We have about 20 scripts, mainly with the same rather small set of dependencies, so this would be kind of wasteful, and I've been thinking instead of putting all the scripts into one .par file, and using parl.exe to run it. R normally builds using ActivePerl, but I couldn't build pp there (I use MinGW compilers, not MS) so I've been using a version built with Strawberry Perl.

I've got a few questions. Bear in mind that I'm not very fluent in Perl (others wrote the scripts), so some of the questions might be very naive.

1. Is it possible to install scripts in subdirectories of script/ within the .par file? I'd like to run them as

 parl foo.par subdir/baz.pl

This will let us keep the same organization of scripts as we have now.

2. Can you run a script that's not in the .par file, but look in there for any modules it depends on? For example, I'd like to do something like the line above even though subdir/baz.pl was not in foo.par.

3. Can pp be packaged into a self-contained .exe file, or a .par file? I tried, but when I was using it it complained. I did

pp.bat -o pp.exe pp

and then in the same directory under CMD.EXE things look okay, but when running elsewhere under Cygwin, I see

$ pp rwver.pl
Module/ScanDeps.pm did not return a true value at PAR/Packer.pm line 35.
BEGIN failed--compilation aborted at PAR/Packer.pm line 35.
Compilation failed in require at pp.pm line 5.
BEGIN failed--compilation aborted at pp.pm line 5.
Compilation failed in require at script/pp line 5.
BEGIN failed--compilation aborted at script/pp line 5.

Is Cygwin the problem here?

4. Would there be license problems in distributing parl.exe and a .par file produced by it with binary builds of R?

Thanks in advance for any answers.

Duncan Murdoch





Reply via email to