Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Updating broken and possibly incomplete SWIG Perl module building tutorial on SWIG web site

by hermida (Scribe)
on Apr 05, 2011 at 21:29 UTC ( [id://897604]=note: print w/replies, xml ) Need Help??


in reply to Updating broken and possibly incomplete SWIG Perl module building tutorial on SWIG web site

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?

  • Comment on Re: Updating broken and possibly incomplete SWIG Perl module building tutorial on SWIG web site

Replies are listed 'Best First'.
Re^2: Updating broken and possibly incomplete SWIG Perl module building tutorial on SWIG web site
by BrowserUk (Patriarch) on Apr 05, 2011 at 21:54 UTC
    So these recommendations were made and I just get shut down.

    Pretty par for the course as far as mailing lists go. Incumbents invariably assume that a new name to the list couldn't possibly know more than they do. And woe betide you if you prove them wrong.

    As likely as not you'll get banned for some unconnected irrelevance, like top posting or bottom posting or interleaving or not interleaving or quoting to little or too much or just cos its the third tuesday in the month.

    And chances are if you stay quite and continue to monitor, someone will pick up your ideas a month or two from now, implement them as their idea and revel in the "glory".

    The good news is that if you can live with that, and the ideas are any good, you'll often get what you wanted anyway.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://897604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found