On Wed, Nov 9, 2016 at 9:49 AM, Timothe Litt <tlhack...@cpan.org> wrote: > > cpan and cpanm seem to handle 'recommended' differently. IIRC, neither > defaults to installing 'recommended' modules. >
Sadly, this is correct and in fact (as far as I know) CPAN.pm still handles recommended prereqs completely wrongly if you do enable them (fails the installation if they don't install). cpanm handles them more correctly but still not ideally. The fact they are not installed by default, in turn, makes them not any more useful than 'suggests' in practicality, so it ends up being a semantic difference. 'recommends' should be modules which are always a good idea to install but not required, and 'suggests' should be modules which the user may consider installing if they choose. This leads to the case as you noted with JSON::MaybeXS, where the only practical solution in the current state of things is to instead rely on dynamic dependencies, and add a hard dependency on the modules that are appropriate at installation time. Dynamic dependencies however are a very widely supported and backwards compatible system. Only configure-time dependencies are read from the static META.json, the rest are read from the generated MYMETA.json, generally even if dynamic_config is set to 0, though in that case it is imperative that the generated prereqs match the static ones.