Tue Aug 24 16:10:23 2010: Request 60697 was acted upon.
Transaction: Correspondence added by DORIAN
Queue: PAR-Packer
Subject: Switch to pp pack only architecture-independent (pure-perl) code
Broken in: (no value)
Severity: Wishlist
Owner: Nobody
Requestors: [email protected]
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60697 >
On Tue Aug 24 15:52:08 2010, SMUELLER wrote:
> Hi,
>
> > Tue Aug 24 14:07:40 2010: Request 60697 was acted upon.
> > I propose that PAR::Packer be given a switch to strip out
> > architecture-dependent (i.e. XS) modules from the dependency inclusion
> > list when packing a PAR. If I missed a method of doing this, then please
> > direct me to it.
>
> I suggest that you take a look at PAR::Dist::FromCPAN. It can generate
> individual .par files for CPAN distributions (and follow dependencies!).
> It can also merge the result.
>
> Since you want to exclude XS modules, you may want to skip the merging
> bit. Use the automatic detection of XS modules and then delete all
> produced .par files that aren't "anyarch". Thereafter, you can merge the
> remaining, pure-Perl .par's with, I believe, the merging function of
> PAR::Dist.
>
> Obviously, this is easily scripted.
>
> Best regards,
> Steffen
>
So suppose I'm in my Catalyst app directory, and I want to make a PAR of
it. I would type `make catalyst_par' and out pops a PAR (theoretically).
The only problem is that PAR is full of XS so when I send it to the
target (Windows) box and try to run it there, I find it very difficult
to get it into a position in which it can cooperate. Namely, it picks
the .pm files from the PAR and the .dll files from the system and
complains that the versions don't match. Merely matching versions is a
brittle solution. I tried invoking it in the way that promotes the
system module search paths over the PAR but saw no change in behaviour.
My thesis is that if those XS modules were not present in the PAR,
things would in the very least be much less confusing.
So, to produce an equivalent alternative solution of generating a PAR
from a Catalyst app sans XS modules would entail a mountain of work,
whereas it would be cheap and simple (and more broadly applicable) to do
it within PAR::Packer.