patching Debian /usr/share/perl/5.10.0/CPAN.pm

jozef on 2009-07-19T21:59:11

apt-get install libtest-exception-perl libfile-find-rule-perl libcarp-clan-perl
apt-get install libjson-xs-perl libclass-accessor-perl libwww-perl
cpan -i dbedia::Debian
mkdir /var/cache/apt/apt-pm
apt-pm update
# try:
# apt-pm find Test::More
# will output:
# libtest-simple-perl/0.62-1: /usr/share/perl5/Test/More.pm 0.62
# libtest-simple-perl/0.88+dfsg-1: /usr/share/perl5/Test/More.pm 0.88
# libtest-simple-perl/0.90-1: /usr/share/perl5/Test/More.pm 0.90
# perl-modules/5.10.0-24: /usr/share/perl/5.10.0/Test/More.pm 0.72
# libtest-simple-perl/0.80-1: /usr/share/perl5/Test/More.pm 0.80
cd /usr/share/perl/5.10.0/
wget http://cpansearch.perl.org/src/JKUTEJ/dbedia-Debian-0.02/examples/CPAN.pm.patch
patch -p1 < CPAN.pm.patch

So what? With this patch CPAN shell will install Debian package of module prerequisity if available taking in account also required version. Then it is possible to do `cpan -i Xacobeo` and most of the dependecies (all except Gtk2::SourceView, that is not packaged) will be installed directly from Debian packages.

`apt-pm` has all the Debian .pm files indexed, so feel free to ask about `apt-pm find SVN::Core` which will return 'libsvn-perl/1.6.1dfsg-1' or `apt-pm find Pidgin` that will tell 'pidgin/2.4.3-4lenny2'. :)


This is awesome

Alias on 2009-07-21T12:22:47

Is there any way to convert this to a full plugin?

CPAN::Debian?

Adam K

Re:This is awesome

jozef on 2009-07-22T10:12:46

Hmm, this should be more like take-or-leave question for Debian developers, as if it is useful then it should be one of the Debian packaging patches to perl-modules. It will be hard to keep up with stable/testing/unstable CPAN.pm versions via CPAN module mechanism.