This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics

Nobody in particular
florent.angly [...]

Broken in:
Fixed in:
(no value)

Subject: Require one out of several dependencies
Sometimes, there are several ways to do one thing and you want to give the user the flexibility to use any one of those. Currently, using 'requires' or 'requires_external_bin', there is no way to specify that one requires only one program or module out of several ones. Consider that my script needs the dependencies A, B or C. I can write: requires_external_bin 'A'; requires_external_bin 'B'; requires_external_bin 'C'; But that forces the user to have A, B, and C installed, when only one of them is needed. I could also write: requires_external_bin 'A'; But that is forcing the user to have A installed, whereas he may only be interested in using B or C. Ideally, instead of 'requires_external_bin', I would like to use something like: requires_external_bin_any ('A','B','C'); The user would be required to provide only A, B or C. Similarly, it may be valuable to use a similar mechanism for 'requires', e,g, 'requires_any'.
I noticed today that one way to do what I describe above is to use the 'feature' option, described (very briefly) at If I had three Perl modules that provided the same function, I would write that I need only one of these this way: feature 'FeatureA', -default => 1, 'ModuleA' => 0; feature 'FeatureB', -default => 0, 'ModuleB' => 0; feature 'FeatureC', -default => 0, 'ModuleC' => 0; However, this method is limited to Perl modules only, and does not work to specify external dependencies. Maybe it could be modified to take this sort of syntax? feature 'FeatureA', -default => 1, -module => [ 'ModuleA' => 0 ], -external_bin => [ 'BinA' => 0 ]; feature 'FeatureB', -default => 0, -module => [ 'ModuleB' => 0 ], -external_bin => [ 'BinB' => 0 ]; feature 'FeatureC', -default => 0, -module => [ 'ModuleC' => 0 ], -external_bin => [ 'BinC' => 0 ];

This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with to