On Mon, Nov 2, 2009 at 4:25 AM, Zbigniew Lukasiak <zzb...@gmail.com> wrote:
> I don't know the history of this, but - risking that I'll add
> something already covered - I would propose that if optional features
> are to be formalized - then they should be allowed to appear in
> 'require_*'.  Otherwise optional features lead to much chaos with
> packages relying on them but not being able to specify that.

Ricardo and I iterated through the implications and semantics last night on IRC.

In short, optional_features serve two purposes: (a) they define a set
of requirements such that if the "requires" portion is satisfied, then
a feature is considered "available" (whatever that means); (b) they
define a set of requirements that are merged to the main requirements
if an install tool chooses to do so (by prompting the user or other
means).

What I think you're asking about is beyond the scope of this META spec
round.  You'd like a way to have Distribution X to say that it wants
distribution Y + distribution Y's optional feature Z.  As others have
said, a better way for features to be packaged is via a separate
distribution.  For example, Foo-Bar-1.23 has optional feature "wibble"
which requires Foo::Bar::Wibble, which comes in the
Foo-Bar-Wibble-1.23 distribution.  In Foo-Bar-Wibble, all sorts of
other modules could be required.

Then, if your module Really::Awesome needs the "wibble" feature, you
just say it requires Foo::Bar and Foo::Bar::Wibble and it all just
works.

On reflection, a note about that should probably be added to the
omnibus prereq branch that describes optional_features.

http://github.com/dagolden/cpan-meta-spec/tree/prereq-omnibus

-- David

Reply via email to