On Sun Jun 02 15:02:41 2013, DAGOLDEN wrote:
Show quoted text> It doesn't really work so easily. You could "require foo 1.0" but
> "recommend foo 1.2". The prerequisite list is a constraint
> specification.
I would say that in those cases, it should add in duplicate entries. But, that's an edge case. (I mean, you have to manually add in all recommend modules in your dist.ini, anyway.) The most common case would be different modules that may or may not be installed on the user's machine.
Show quoted text> Can you show me the output you want? It might be easier to understand
> what you're asking for that way.
It could look something like this:
# Phase Relationship Version Module
# ------- ------------ ------- -------------------
# Build Requires 6.66 ExtUtils::MakeMaker
#
# Runtime Requires 1.110 Foo::Bar
# Runtime Requires 1.110 Foo::Bar::Coolness
# Runtime Requires 1.26 Carp
# Runtime Requires 2.0802 Class::MOP
# Runtime Requires 3.40 Cwd
# Runtime Requires 2.24 Date::Format
# Runtime Requires 2.30 Date::Parse
#
# Runtime Recommends missing YAML::Syck
# Runtime Recommends missing Email::Simple
#
# Test Requires 0.98 Test::More
# Test Requires 1.2000 Time::Local
# Test Requires 0.12 Try::Tiny
Or, if the repetition is too ugly, then something like this:
# Version Module
# ------- -------------------
# === Build Requires ===
# 6.66 ExtUtils::MakeMaker
#
# === Runtime Requires ===
# 1.110 Foo::Bar
# 1.110 Foo::Bar::Coolness
# 1.26 Carp
# 2.0802 Class::MOP
# 3.40 Cwd
# 2.24 Date::Format
# 2.30 Date::Parse
#
# === Runtime Recommends ===
# missing YAML::Syck
# missing Email::Simple
#
# === Test Requires ===
# 0.98 Test::More
# 1.2000 Time::Local
# 0.12 Try::Tiny
Whatever style works for you. The point is that you don't have a huge list of dependencies, with these two missing ones, and don't freak out that and say "Well, there's your problem... you have these two required dependencies missing here." Only to find out that they aren't actually required in the first place.
Sorting would done as: (phase, relationship, alpha), with the first two in the order listed here:
https://metacpan.org/module/CPAN::Meta::Spec#PREREQUISITES
(And I should probably be using Suggests more often, but I digress...)