in reply to CPAN module dependencies: possible to depend on A OR B

FWIW, I downloaded Net::HTTPS::Any, and all the tests passed, but that's because I have OpenSSL, Net::SSLeay, and Crypt::SSLeay.

A couple of questions: What version of OpenSSL did you test this against? What versions of Net::SSLeay and Crypt::SSLeay did you use to build the module?

Instead of using OR, I would use CONFIGURE_REQUIRES in your Makefile.PL. That way, it'll stop the installation. and your users won't have to go through all tests just to fail. I revamped your Makefile.PL:

use inc::Module::Install; WriteMakefile( NAME => 'Net::HTTPS::Any', AUTHOR => 'Ivan Kohler <ivan-net-https-any@freeside.bi +z>', VERSION_FROM => 'lib/Net/HTTPS/Any.pm', ABSTRACT_FROM => 'lib/Net/HTTPS/Any.pm', PL_FILES => {}, CONFIGURE_REQUIRES => { 'Net::SSLeay' => 0, 'Crypt::SSLeay' => 0, }, PREREQ_PM => { 'Test::More' => 0, 'URI::Escape' => 0, 'Tie::IxHash' => 0, 'Net::SSLeay' => 0, 'Crypt::SSLeay' => 0, 'LWP' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => '.gz', }, clean => { FILES => 'Net-HTTPS-Any-*', }, );

Replies are listed 'Best First'.
Re^2: CPAN module dependencies: possible to depend on A OR B
by ikegami (Patriarch) on May 25, 2010 at 14:31 UTC
    That will make it fail is they don't have both. It should only fail if neither is installed.