On Wed Jan 31 08:46:50 2007, MTHURN wrote:
Show quoted text> At line 331 of CPANPLUS::Dist, please do NOT sort the list of prereqs.
> Often, prereqs must be specified in a particular order, one reason is
> because unfortunately many published modules do not properly specify all
> their prerequisites. Being able to list prereqs in a certain order in a
> Makefile.PL or in a Bundle allows other module authors to work around
> that situation.
Hmm, I'm not sure how to cope with this request; the sort that is being done
is on the result of the keys() function of a hash. This makes the order in
which the keys are inheritely 'random' [1]. So removing the sort() call at this
line will not yield the result you're looking for -- the keys will be simply
sorted in _another_ order which is unpredictable..
On top of that, in the traditional Makefile.PL, like the one for Archive::Extract [2],
the PREREQ_PM argument is supplied with a hash, so at this time already the
order of the keys will be 'random'.
As we parse the produced Makefile to find the prerequisites as EU::MM has
identified them, there's no way to preserver the order.
Now, for bundles we parse the .pm file ourselves, as the bundle format is
straight forward and does not need code to be executed (as opposed to
Makefile.PL), so there the request could be honored.
However, this is a major surgery on the guts of CPANPLUS, so I'd first like to see
some actual use cases where this is essential. Situations where A needs to be
installed before B, because B requires A, one could argue that B should specify
B as a dependency explicitly, rather than relying on bundle:: ordering...
Let me know what you think,
-- Jos
[1] For full details on random, see:
http://perldoc.perl.org/functions/keys.html
[2]
http://search.cpan.org/src/KANE/Archive-Extract-0.16/Makefile.PL