[rt.cpan.org #95809] [PATCH] Using Inline in a distribution with multiple modules
[email protected] ("Sisyphus via RT") Wed, 11 Jun 2014 03:24:14 -0400
| Newsgroups | perl.inline |
|---|---|
| Message-ID | <[email protected]> |
Wed Jun 11 03:24:13 2014: Request 95809 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: [PATCH] Using Inline in a distribution with multiple modules
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: [email protected]
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=95809 >
On Mon Jun 09 22:45:21 2014, [email protected] wrote:
> Ok I'll check into that too :). Now I just have to find some time this
> week...
Hi Jason,
The problem seems to be mostly fixed if, at line 55 of (your patched) lib/Inline/Makemaker.pm we change:
if ($mm->{PMLIBDIRS} && $mm->{PM}) {
to:
if (@{$mm->{PMLIBDIRS}} && $mm->{PM}) {
That at least allows both "layouts" to build and install as desired. On the perls I've just tested, an array reference is true even if the array being referenced is empty - hence the need for the alteration.
However, that change doesn't fix the annoyance of having the compilation re-run during each of the make steps (which happens because the specified .inl target is not met).
Incidentally, for a long time Inline has shipped with the demo module named Math::Simple-1.23.
It was always packed into the source as:
modules/Math/Simple/Changes
modules/Math/Simple/Makefile.PL
modules/Math/Simple/MANIFEST
modules/Math/Simple/Simple.pl
modules/Math/Simple/test.pl
In git (https://github.com/ingydotnet/inline-pm), I've now rearranged that as the more usual:
modules/Math-Simple-1.23/Changes
modules/Math-Simple-1.23/Makefile.PL
modules/Math-Simple-1.23/MANIFEST
modules/Math-Simple-1.23/Simple.pl
modules/Math-Simple-1.23/test.pl
And I've also added a second demo which is essentially the same distro as the one we've been using as our reference. (I've changed the names of the modules from Foo, Foo::Bar, and Foo::Bar::Baz to Boo, Boo::Far and Boo::Far::Faz - other than that it's the same).
So, in git, you'll also find:
modules/Boo-2.01/lib/Boo.pm
modules/Boo-2.01/lib/Boo/Far.pm
modules/Boo-2.01/lib/Boo/Far/Faz.pm
modules/Boo-2.01/Makefile.PL
modules/Boo-2.01/MANIFEST
modules/Boo-2.01/t/boo.t
These files will, of course ship with future Inline releases as demos of the 2 layouts.
Naturally, what we want is for both of those demos to build correctly out of the box.
With the above alteration to your patched MakeMaker.pm I think they do that - except that Math-Simple-1.23 wants to recompile the C code at every 'make' step.
Cheers,
Rob