Ira Woodhead wrote:
The h2xs that comes with perl 5.8.x generates module stubs that seem to
be incompatible with Inline!

I've just been trying to migrate some modules I made with Inline to what
appears to be the default new layout (for perl 5.8?). When I call "h2xs
-XA -n Mod::Name" it creates stubs much like before, with an exception.
Instead of


Module-Name/Name.pm

we have:

Module-Name/lib/Module/Name.pm

...everything else seems to be in the same place as before ie MANIFEST,
Makefile.PL, t/ etc.

With exactly the same Makefile.PM, nearly identical Makefiles are
generated by "perl Makefile.PM". However, problems arise because Inline
apparently expects Name.pm to be in the top level directory, and when it
isn't, make complains that there is "No rule to make target Name.inl",
and exits.

The crucial line in Makefile appears to be the one called to generate
the .inl file:
$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -MModule::Name -e1 0.01
$(INST_ARCHLIB)

This works perfectly when I link the .pm file into top level with "ln -s
lib/Module/Name.pm Name.pm".

But I know that's not the Right Way to do it, so any ideas?


Don't you love it when they do stuff like that.


I thought there might be a switch you could pass to 'h2xs' that would create the old structure, but I couldn't find such a thing.

In the absence of better advice it is my humble opinion that anything you do that works *is* the "Right Way to do it" :-)

I would probably run a perl program that runs 'h2xs' (as a system command) and then fixes the structure so that it works with Inline.

Cheers,
Rob



Reply via email to