P is for Practical | |
PerlMonks |
Re: Updating broken and possibly incomplete SWIG Perl module building tutorial on SWIG web siteby hermida (Scribe) |
on Apr 05, 2011 at 21:29 UTC ( [id://897604]=note: print w/replies, xml ) | Need Help?? |
Just to give people an update, I looked into ExtUtils::MM and wrote the correct Makefile.PL that works for building a SWIG Perl module and recommended on the SWIG user list that I talked to people on Perlmonks and they recommended what you wrote on this thread.
I was criticized by a person on the list saying "why in the world would you recommend using ExtUtils::MM that's so 15 years ago, you should use Module::Build, Module::Install or Dist::Zilla". I told him just because ExtUtils::MM is older for these purposes its just as capable and suitable as all the others mentioned. There are probably other reasons all of you mentioned using it instead of the others, even though the others are newer and have certain advantages. I was then criticized for recommending that SWIG should auto-generate the Makefile.PL as it already auto-generates wrapper code and such. The reason was that SWIG doesn't generate any of these build helper files for the other languages (like the ant file for Java for example) then it shouldn't do it for Perl. Sometimes I think why do I even try to help? This all started because the Perl quick start tutorial on the SWIG web site didn't even work and wasn't correct for building C/C++ code modules in Perl (and just to add that list user who said these recommendations are stupid never bothered to help and fix the tutorial!). So I fixed it by examining how ExtUtils::MM and others compile and link C/C++ code in Perl and as you guys know I recommended replacing the bad tutorial commands with those commands above. You guys then went one step further and recommended to me that its more robust to use a Makefile.PL and let ExtUtils::MM deal with the commands as it will do it better for each particular Perl installation, OS, environment, etc. So these recommendations were made and I just get shut down. The user who said it was stupid to auto-generate a Makefile.PL said that people will just write what they want manually and they don't need it anyway. But I say why can't SWIG just generate a minimum correct Makefile.PL or Build.PL that by itself would at least correctly build the SWIG code since it auto-generates other code and files? Users can add/change to it if they want. I mean how hard is that? SWIG generates these other code files that need to be compiled and linked properly and nothing in order to do that. I totally disagree with this person that if you have a development tool that more easily integrates C/C++ code with your target language shouldn't it also come with the minimum file to properly build your code? I don't think that if SWIG doesn't do it for any language that it shouldn't start. Thoughts?
In Section
Seekers of Perl Wisdom
|
|