On Thu, Sep 25, 2008 at 1:14 AM, Martin Evans <[EMAIL PROTECTED]> wrote:
> Yes, that is what I found. The problem is that ExtUtils::MakeMaker will not
> override an INC specified on the command line so any attempts to add the
> path to DBI header files to INC in the Makefile.PL are a waste of time. No
> one on the ExtUtils::MakeMaker list seemed to know where this behavior came
> from or whether it was right -
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg02680.html

Ahh, but if you tickle ExtUtils::MakeMaker the right way, she'll come
out and dance with you.

> Do you know if strawberry perl has some sort of signature that the
> Makefile.PL can spot? As ExtUtils::MakeMaker is not going to change right
> now and neither is strawberry perl I was thinking about outputting a message
> if INC was in ARGV but was hoping to restrict this just to strawberry perl
> for now as I've never seen it anywhere else.

I played with this some more, and the attached patch (also archived as
[1]) was the best thing I could think of; I copied the same DBI
include path trick from earlier in the Makefile.PL, I just do it again
in the section of Makefile.PL where you override MakeMaker sections
(package MY).  See [2] for more on overriding MakeMaker methods.

This patch would need to be applied to every module that needs the DBI
include paths that you wanted to compile on Strawberry.  Is it worth
asking the Strawberry people to remove the INC paths out of their CPAN
Config.pm module?  My experience has been that what's set in Config.pm
works just as well.  I don't know if Adam or David are on this list,
but their mailing list is at [3].

Thanks,

Brian

[1] 
http://code.google.com/p/camelbox/source/browse/trunk/build-extras/Strawberry_Perl/DBD-ODBC.Makefile.PL.diff
[2] 
http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.46/lib/ExtUtils/MakeMaker.pm#Overriding_MakeMaker_Methods
[3] http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to