Hello everybody, I am developing the module SVG::Rasterize, which uses the Perl bindings of the Pango C library. I have got CPAN testers fail reports that I could track down to the following problem:
The testing system had the right version of the Pango Perl module (>=1.220), but a too old version of the underlying C library. The Perl bindings only require version 1.x of the C library, but my module uses functions only available from version 1.22 on. I have been in contact with the developers of the Pango Perl module and they told me that they have decided explicitly for this behaviour in order to enable users to upgrade the Perl module without having to update the C library. Therefore, I have to "manually" check the version of the C library which is possible via the Pango->CHECK_VERSION method. My problem is now how I report a failure of the version check in a way that automatic tests report the failure as N/A instead of FAIL. To achieve that I have modified my Makefile.PL in the following way (taking inspirations from the Module::Install::External module): 1) I have included Pango into my configure_requires instead of requires settings to have it available during execution of Makefile.PL. 2) I have inserted the following section: # for systems not supporting configure_requires we require Pango # within an eval statement if(eval { require Pango }) { if(!Pango->CHECK_VERSION(1, 22, 0)) { print("SVG::Rasterize requires the Pango C library at least ", "in version 1.22. Please upgrade.\n"); print(STDERR "NA: Unable to build distribution on this ". "platform.\n"); exit(0); } } else { print("The execution of the SVG::Rasterize Makefile.PL requires ", "the presence of the Pango module. Your system does not seem ", "to support configure_requires entries in META.YML. Please ". "install Pango before installing SVG::Rasterize.\n"); print(STDERR "NA: Unable to build distribution on this ". "platform.\n"); exit(0); } My questions are: 1) Do you think that this is in general a good approach to solve my problem. 2) Does this solution, specifically the STDERR output, indeed achieve that CPAN testers will recognize this as N/A? Thank you for your help Lutz