Hi
adamk,
It's an interesting question (on a number of points). I speculate (untested) that if the Makefile.PL simply does something like:
WriteMakefile(
NAME => 'whatever',
VERSION_FROM => 'whatever.pm',
);
then the
perl Makefile.PL INC="-I...." LIBS="-L... -l..." would always work fine. It has always worked fine for me. Faik, however, there may be ways of writing a Makefile.PL that break that method.
What is the "correct" way to provide the include paths via CPAN.pmThe "correct" way to install any software is to download the source and follow the instructions in the README file (or should that be the INSTALL file ?). Of course CPAN.pm totally ignores what's written in the README/INSTALL, thereby committing a fundamental sin - to the extent that I therefore wonder if the term "correct" is even applicable in the context of CPAN.pm.
However, that's probably not a very helpful observation/opinion. I don't use CPAN.pm, but I can well imagine that if I did try to use it to install something like Net::SSH::Perl (without having already installed Math::GMP) then there would be a problem because my GMP library is not in a standard location (ie it won't be found by default). So, I would need to be able to provide a switch to the CPAN command that tells the compiler to look in that non-standard location. (But then, how would I necessarily know in advance that I needed to provide that switch ?) Is that what you're getting at ... how to universally avoid the hiccup I would encounter if I were to try to build Net::SSH::Perl under those circumstances ?
(Needless to say I don't use Net::SSH::Perl, either :-).
Cheers,
Rob