Reputation: 31
I've installed Perl modules for Mysql and DBI, however I'd like to downgrade them to older versions due to a bug which I have encountered with the current versions. Is it possible to downgrade these to an older version using cpan? How would I do this?
Upvotes: 3
Views: 2200
Reputation: 3190
To force the installation of a specific version of the modules, you can execute this; assuming you have all of the tool chain needed to compile and test:
perl -MCPAN -e shell
cpan[1]> force install TIMB/DBI-1.642.tar.gz # assuming 1.642
cpan[2]> force install DVEEDEN/DBD-mysql-4.050.tar.gz # assuming 4.050
If you use CPAN::FindDependencies
, then you can find modules that depend on DBI and DBD::mysql and execute their tests.
You will want to pay attention to the execution of each module's forced installation because the tests might fail. If, say, the older DBI's tests fail (or its dependents) then you would have to make a decision about which tests you want to fail: DBI's, DBI's dependents, or your application. Finding an older version that works for the whole environment might be more trouble than it's worth. It might be easier to try to work around the DBI (or DBD::mysql) problem than it is try to find an older version that works for the whole perl environment. If the older DBI has dependencies that you haven't met, then meeting them might cause a recursive dependency nightmare.
Upvotes: 4
Reputation: 451
Theoretically it should be possible to remove them with cpanm --uninstall
and then install older versions from BackPan http://backpan.cpantesters.org/. But you can never know what happens within the dependency chain.
Upvotes: 1