Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 24694
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: MTHURN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.076
Fixed in: (no value)



Subject: Please do NOT sort the prereq list
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. -- - - Martin 'Kingpin' Thurn
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
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.
There is no order to the prereqs. Never has been, AFAIK. Whatever happened to work to imply an order is an implementation quirk. Nor should there be. The chain of dependencies should work on down the line. In know sometimes this chain is broken, but there has to be a better solution to broken dependencies than for the dependents to all work around the problem. My $0.02.
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.
There is no order to the prereqs. Never has been, AFAIK. Whatever happened to work to imply an order is an implementation quirk. Nor should there be. The chain of dependencies should work on down the line. In know sometimes this chain is broken, but there has to be a better solution to broken dependencies than for the dependents to all work around the problem. My $0.02.
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.
There is no order to the prereqs. Never has been, AFAIK. Whatever happened to work to imply an order is an implementation quirk. Nor should there be. The chain of dependencies should work on down the line. In know sometimes this chain is broken, but there has to be a better solution to broken dependencies than for the dependents to all work around the problem. My $0.02.
Subject: RE: [rt.cpan.org #24694] Please do NOT sort the prereq list
Date: Thu, 03 May 2007 07:55:57 -0400
To: <bug-CPANPLUS [...] rt.cpan.org>
From: "Martin Thurn" <mthurn [...] verizon.net>
Show quoted text
> but there has to be a > better solution to broken dependencies than for the dependents to all > work around the problem.
As far as I can tell, the "proper" Bundle install order is not documented anywhere. Maybe someone should document it. And maybe while we're documenting it we can take the liberty of DEFINING it to be "in the order they appear in the file". That way it's not a workaround, it's the defined behavior! 8-) No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.2/785 - Release Date: 5/2/2007 2:16 PM