Pic has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to wrap a C library (the Xerox finite state tools, here for more) with SWIG, and after a certain amount of trial and error (structs with the same name as structs in the Perl headers, dead functions in the headers), I've gotten the basics running. Now I wonder if there are some best practices I should keep in mind while the project is still in its infancy, and some other bits and pieces related to making a "real" module:

Replies are listed 'Best First'.
Re: Perl & SWIG best practices?
by John M. Dlugosz (Monsignor) on May 22, 2011 at 19:37 UTC
    My understanding from similar recent investigations is that Module::Build is newer than the old Makefile.PL tools and should be used instead. But Dist::Zilla offers even better tools for the author (though is hard to install), and Module::Install is even better than Module::Build for whatever technical reasons and in working with up-to-date best practices. (see link)

    It seems there is a lot to learn about testing, and module creation scripts are well behind the curve in what they set up for you.

    The normal installation process will run the C compiler if necessary. For these build tools, you just have to use the proper naming and directory convention and it knows what to do.