Hello David, thanks a lot for your quick and helpful reply. On Tue, Jun 15, 2010 at 08:57:28PM -0400, David Golden wrote: > On Tue, Jun 15, 2010 at 8:37 PM, Lutz Gehlen <lrg...@gmx.net> wrote: > > My questions are: > > 1) Do you think that this is in general a good approach to solve my > > problem. > > I think they are quite reasonable. You might also find the > development version of Devel::CheckLib to be an alternative as as a > more direct way to check the library even if configure_requires are > not satisfied. (The dev version of Devel::CheckLib supports checking > an arbitrary C function and you could use it to check the version.)
Devel::CheckLib is a good thing to know. In this case, however, I will probably stick to the other solution, since it will for sure give me the library version the Perl module was compiled against, and this is what I want. > > 2) Does this solution, specifically the STDERR output, indeed > > achieve that CPAN testers will recognize this as N/A? > > It won't generate "NA" -- instead no report will be sent at all. > Explanation: you have "exit(0)" in your code, which will terminate the > Makefile.PL without creating a Makefile. That specific situation -- > exit code zero but no Makefile.PL -- is interpreted by CPAN clients > (and smoke testers) to mean that configuration is not possible for > known reasons (as opposed to an error condition). In such a > situation, no CPAN testers report would be sent at all, which is the > appropriate behavior when a dependency cannot be satisfied. Thank you for this background information, it answers all the pending questions. Best wishes, Lutz