cpanp で古いバージョンのモジュールを入れる

MojoMojoをgithubから取ってきたのはよいが、make testが通らない、、、で結論としては、SQL::Abstract のバージョン1.5(最新)が原因のようです。
(こいつの中身までは未調査ですが)


$ perl -MSQL::Abstract -E 'say $SQL::Abstract::VERSION;'
1.50
$

なので、cpanpからモジュールのバージョンダウンをしてみる。


CPAN Terminal> u SQL::Abstract

This will uninstall the following modules:
SQL::Abstract

Note that if you installed them via a package manager, you probably
should use the same package manager to uninstall them

Are you sure you want to continue? [y/N]: y
Uninstalling 'SQL::Abstract'
Module 'SQL::Abstract' uninstalled successfully
All modules uninstalled successfully

CPAN Terminal> f SQL::Abstract

1 SQL-Abstract 2008-07-09 1.24 MSTROUT
2 SQL-Abstract 2008-07-09 1.24 MSTROUT
3 SQL-Abstract 2009-02-11 1.4901 MSTROUT
4 SQL-Abstract 2009-02-17 1.4903 MSTROUT
5 SQL-Abstract 2009-03-03 1.4904 MSTROUT
6 SQL-Abstract 2009-02-16 1.4902 MSTROUT
7 SQL-Abstract 2009-03-11 1.50 MSTROUT
8 SQL-Abstract 2009-03-10 1.50 MSTROUT

CPAN Terminal> i 1

Installing SQL-Abstract (1.24)
Running [/usr/local/bin/perl /usr/local/bin/cpanp-run-perl /root/.cpanplus/5.10.0/build/SQL-Abstract-1.24/Makefile.PL ]...
Writing Makefile for SQL::Abstract
Running [/usr/bin/make test ]...
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00new.t ....... ok
t/01generate.t .. ok
t/02where.t ..... ok
t/03values.t .... ok
All tests successful.
Files=4, Tests=103, 0 wallclock secs ( 0.16 usr 0.06 sys + 0.35 cusr 0.10 csys = 0.67 CPU)
Result: PASS
*** Install log written to:
/root/.cpanplus/install-logs/SQL-Abstract-1.24-1238088318.log

Module 'SQL-Abstract' installed successfully
No errors installing all modules

CPAN Terminal>


$ perl -MSQL::Abstract -E 'say $SQL::Abstract::VERSION;'
1.24

ちなみに、アンインストールしないで実行すると、エラーは出力されないので注意。


CPAN Terminal> i /M/MS/MSTROUT/SQL-Abstract-1.24.tar.gz

Installing SQL::Abstract (1.24)
*** Install log written to:
/root/.cpanplus/install-logs/SQL-Abstract-1.24-1238087909.log

Module 'SQL::Abstract' installed successfully
No errors installing all modules

CPAN Terminal>

ログではエラー。

# more /root/.cpanplus/install-logs/SQL-Abstract-1.24-1238087909.log
[MSG] [Fri Mar 27 02:18:29 2009] Module 'SQL::Abstract' already up to date, won't install
without force
#