# from Mark Hedges via RT
# on Thursday 29 July 2010 20:47:
Show quoted text>I specify an older library in requires. But `Build installdeps`
> always installs a newer version. Then Build says there's an error in
> prerequisites. Is there any way for `Build installdeps` to install
> the correct version?
Hi Mark,
The CPAN client will always try to install the latest release version of
any requested module unless you specify an explicit tarball path (for
older or alpha versions.)
The prereq version specifiers in Build.PL have support for pegging or
disallowing certain versions. However, I don't think installdeps is
able to translate these into override arguments for the CPAN client
(and further: I'm not sure if the CPAN client has a way to request
module name + version rather than tarball path because this data is not
available in the standard archive indexes.)
In short, I think this would be a complicated feature to implement (at
best) and may not even be possible without specifying more data than
the prereq version (e.g. explicit tarball path) due to how the CPAN
archive is structured. Then, there is the issue of passing arguments
to whatever command was given as a '--cpan-client' option, which is
currently just supposed to take a list of module names.
You can probably override ACTION_installdeps and get a fairly simple
solution for your case, but be aware that different CPAN clients might
expect different arguments for tarball paths rather than module names.
--Eric