Anonymous Monk said:
long-standing assumption by module authors that you can ask the user to provide you anything you like as a param to Makefile.PL
I have not made that assumption. I have gone out of my way to make my modules work without FAILs from cpan-testers, via cpan shell, from the command line and the module in question:
- uses prompt which does not prompt when doing automated smoking like cpan-testers do and fall back to a decent default.
- goes out of its way to ensure cpan knows what the requirements are - setting build_requires, configure_requires in META (although it would seem few people have a cpan that understands these yet). They set PREREQ_PM in ExtUtils::MakeMaker. All so cpan knows what the dependencies are and automated smokers don't baulk and FAIL it.
- instead of asking whether DBI is installed and where the DBI header file can be found they use a method supplied with DBI to return the header file name and location. They then set this into INC but this is where it all goes wrong in strawberry perl and it also causes a major problem needing to ensure DBI is present before calling a method in DBI but having to do this after PREREQ_PM is acted on.
- defaults to the most common configuration for the platform you are building on but supports overrides for anyone wanting anything not so usual.
- understands that for some people they may be installing the module before having installed an ODBC driver and the tests don't baulk on this.
Between trying to avoid FAIL reports via cpan-testers, keeping up with non-compatible changes in ExtUtils::MakeMaker and supporting distributions that work differently (like strawberry perl) I'm guessing some module authors are living in a world of pain and certainly I seem to be spending more time tweaking things back and forth in the installations instead of adding all those requested features the users of the module want.
All I want in this case is to add a path to INC (without it my module will not even build - it is XS and needs DBI header files). It would appear for the current version of ExtUtils::MakeMaker and strawberry perl the only automatic thing I can do is delete INC from ARGV which seems a little drastic. The user on the other hand can either a) install manually b) edit makepl_arg in cpan c) edit Makefile after generation. For now I'm looking for INC in ARGV, outputting a message saying it will not work with advice on fixing it and, oh yes, remembering to exit 0 without creating a Makefile or cpan testers will issue a FAIL.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.