frazap has asked for the wisdom of the Perl Monks concerning the following question:
I have seen Distro with multiple XS modules that the question has already been asked but I hope to get more specific tips.
I have one very small module, Win32::Shortkeys::Kbh that use xs code to interact with windows API functions.
I can change the code, compile it with a makefile.PL in the top module folder:
The xs c and h files are also in this folder.WriteMakefile( NAME => 'Win32::Shortkeys::Kbh', VERSION_FROM => 'lib/Win32/Shortkeys/Kbh.pm', ABSTRACT_FROM => 'lib/Win32/Shortkeys/Kbh.pm', OBJECT => 'hook.o Kbh.o', );
I have an other module Win32::Shortkeys, that use this first one and consists only from perl code. The makefile.pl is
WriteMakefile( NAME => 'Win32::Shortkeys', VERSION_FROM => 'lib/Win32/Shortkeys.pm', # finds \$VERSION .... PREREQ_PM => { ... 'Win32::Shortkeys::Kbh' => 0.01, 'Config::YAML::Tiny' => 1.42, ... }, );
Even if the xs module could be used by others, it's so tiny that I would try to unite both modules in a single module (win32::Shortkeys).
I suppose I could place the xs code in a xs folder. From the mod_perl example given in the node above, I see that there's also a makefile.PL here but I would be glad if someone could gave me more indication, redirect me to more examples, before I start testing...
Thanks !
frazap
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: xs code in a perl module
by stevieb (Canon) on Oct 25, 2017 at 15:07 UTC | |
by frazap (Monk) on Oct 26, 2017 at 13:36 UTC | |
|
Re: xs code in a perl module
by holli (Abbot) on Oct 25, 2017 at 12:34 UTC | |
|
Re: xs code in a perl module
by Anonymous Monk on Oct 25, 2017 at 12:39 UTC | |
by Anonymous Monk on Oct 25, 2017 at 12:41 UTC | |
by frazap (Monk) on Oct 26, 2017 at 13:22 UTC | |
|
Re: xs code in a perl module
by Anonymous Monk on Oct 25, 2017 at 12:54 UTC |