Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 12850
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: smueller [...] cpan.org
Requestors: martin_hosken [...] sil.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.87
Fixed in: (no value)



Subject: .parl fails to install
I want to distribute a binary module in compiled form to Windows users. This is turning out to be much harder than I had hoped. The ppm approach of having to register a directory as a repository is a pain so I turned to PAR. My aim would be for people to simply perl the .parl to install the module. But hey complex command lines are a possiblity. So I created my module as a .parl using: par -p creates the .par from the blib/ directory par -b -O./output.parl input.par turns a .par into a .parl (well an 'executable' .pl file) and to install I would expect to type the following incantation ;) perl output.parl --par-options -i the problem is that it doesn't work on a machine without PAR installed. The reason seems to me to be that the core code in the .parl file all exists in a huge BEGIN {} statement that gets executed before the following modules that it relies on, are loaded. Any suggestions? Activestate perl 5.8 TIA, Martin
On Di. 17. Mai 2005, 00:03:29, guest wrote: Show quoted text
> I want to distribute a binary module in compiled form to Windows > users. This is turning out to be much harder than I had hoped. The > ppm approach of having to register a directory as a repository is a > pain so I turned to PAR. My aim would be for people to simply perl > the .parl to install the module. But hey complex command lines are > a possiblity. So I created my module as a .parl using: > > par -p > creates the .par from the blib/ directory > > par -b -O./output.parl input.par > turns a .par into a .parl (well an 'executable' .pl file) > > and to install I would expect to type the following incantation ;) > > perl output.parl --par-options -i > > the problem is that it doesn't work on a machine without PAR > installed. The reason seems to me to be that the core code in the > .parl file all exists in a huge BEGIN {} statement that gets > executed before the following modules that it relies on, are > loaded. > > Any suggestions? > > Activestate perl 5.8
Sorry for this late reply. I didn't maintain PAR back then. Have you looked at PAR::Dist? Given a distribution such as those from CPAN. After "perl Makefile.PL" and "make", you should have a blib/ subdirectory. Then just do "perl -MPAR::Dist -eblib_to_par" in the directory containing "blib/". The resulting .par file is installable via "perl -MPAR::Dist -einstall_par('filename')". As a matter of fact, it can even install from URLs or from CPAN. (See manpage for details.) Of course, this imposes that the user has PAR::Dist. Installing PAR::Dist, however, is trivial. (It's pure-perl.) If installing it by other means (ppm, cpan, manual) isn't possible, it's easy enough to inline into a simple installation script. In fact, if you have a reasonably powerful shell, you can do this: $ echo -e '\n\nPAR::Dist::install_par(shift @ARGV);\n' | cat Dist.pm - Show quoted text
>> par-installer
Where Dist.pm is the .pm file from the PAR::Dist distribution. Afterwards, "par-installer" should be a stand-alone perl script that installs the .par archive given by its first command line argument. It should be possible to do the same with "echo" and "type" on Windows. (Or just use copy&paste.) Hope this helps, Steffen