|Keep It Simple, Stupid|
Re^2: Strawberry CPAN.pm wrongly overrides INC in Makefile.PLby nobull (Friar)
|on Sep 28, 2008 at 12:20 UTC||Need Help??|
I was going to recommend their mailing list, but I'm not actually finding any information on it. I know I've seen those guys active (arguing the merits of strawberry over active) on one of the lists I follow. (Probably perl-xs?) I'm sure they have a list somewhere. That's definitely where I'd start.Thanks. I'll address that in an update to my original node.
It isn't a bug. They did that because they include a bunch of libs with strawberry, which is part of the reason people like that dist I believe.
I think you are mistaken. Or more accurately you may be right in your assertion that "they did that because..." but they were in fact suffering from confused thinking when they did it.
The directories that are being added (or rather substituted) here are not the (just) directories containing the "bunch of libs" they are the directories containing the standard include files and libraries that are part of the GCC installation.
The Makefile invokes GCC as simply "gcc" thus assuming that the environment (at least PATH) is configured correctly to find the correct GCC installation. If you are using the GCC.EXE that's found by traversing the PATH environment variable then you should be using the headers and libraries that are found by traversing the LIB and INCLUDE environment variables.
Ironically when Strawberry is installed it also puts C:\strawberry\perl\lib\CORE into the INCLUDE environment variable (and similarly the LIB variable). This is also wrong! The Makefile that is created by Makefile.PL does not and should not assume that these directories are listed in the environment variables. (Update: the Vanilla Perl documentation admits "LIB and INCLUDE changes are likely more than are necessary, but attempt to head off potential problems compiling external programs for use with Perl and various CPAN modules.". I still think it is wrong to include the C:\strawberry\perl libraries in the INCLUDE and LIB environment variables.) (Further update: these are to be removed in the next release.)
You might argue it's a bug in CPAN...
Definitely not, the setting in the CPAN/Config.pm file is explicitly there for providing arguments to be passed unchanged through to the invocation of Makefile.PL. It is impossible to fault CPAN.pm for doing so.
It seems to be the various INC dirs (from config and makefiles) should be additive in some circumstances. So maybe it's a bug in EU::MM? I certainly couldn't say. I can think of cases were you'd want to be able to override INC and others where you'd want to add them.
This is all true. However, for the reasons I give above, I consider it irrelevant in the current context.