Xavier Noria wrote:
On Nov 12, 2005, at 19:12, Marvin Humphrey wrote:
Xavier,
Changing this line in Makefile.PL...
NAME => 'Foo::Bar::Baz',
to this...
NAME => 'Foo::Bar::Baz::XSModule',
... triggers compilation for me.
I'm curious why you're doing things this way.
Because the main module in the distribution is a pure Perl module. Some
of it is factored out for speed to C, and I wanted to put that in a
second, auxiliar module. Maybe this is just not the natural way to
prepare a distro with XS (I am a newbie here).
as Marvin has already toll you, the usual way is to put everything on
the same package, but if you want to divide it on two it is also
possible because you can include packages inside other packages and they
will be recursively build.
For instance, create both packages skeletons with h2xs
$ h2xs -AX -n Foo # no XS on this one
$ h2xs -A -n Foo::LowXS
Then move the XS module directory inside its parent:
$ mv Foo-XS Foo/LowXS
Recreate the Foo/MANIFEST and put the actual code in place, and that's all.
Though you should remember that Foo and Foo::LowXS are different
modules, you will probably need to "use Foo::LowXS" from Foo.
Cheers,
- Salva