in reply to Should my project be uploaded to CPAN as a module or an Application?
The further thought I have is that you might benefit from structuring your code in a more CPAN-like way; specifically, to move your current code more to being a set of libraries, that your application (or possibly, applications) can call to achieve their effects. This would include separating out your actual seismic stuff (which I assume uses PDL) into truly separate modules, that could be released separately. You would also carve out any Tk widgets that are genuinely separate, if you have any rather than "just" a nice Tk user-interface.
The general approach would be to turn what is currently a large, impressive piece of code that I am sure is really useful in exactly its current context (in classrooms, if I got that right), into a number of smaller pieces of code assembled into something great for that context, but allowing many other uses too. For instance, I would quite like to make a PDL demo out of the seismic stuff, with visualisations using either Gnuplot (like Photonic uses), or maybe OpenGL (using PDL's "TriD" stuff).
Specific thoughts on handling C code. If it can be carved out into its own Perl-accessible XS code, you should do that. EUMM handles that just by adding to the OBJECT key/variable. If you have C code that is useful to link into a number of bits of XS code, then you can copy the model used in the partly-finished https://github.com/PDLPorters/PDL-OpenCV: it creates .o files in the top directory (in fact, out of autogenerated C code), then the subdirectories' Makefile.PLs add those .o files to be linked into that subdirectory's library. If you just have C executables like synseis, then PDL's pdl.c shows how to build and install those. However, looking at that code, it might well be better as a Perl script with an XS library for the various functions like ricker, and maybe even just use PDL for those.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Should my project be uploaded to CPAN as a module or an Application?
by gllore (Acolyte) on Oct 13, 2022 at 22:49 UTC | |
by etj (Priest) on Oct 25, 2022 at 16:23 UTC |