Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: What is the best way to install CPAN modules on Debian?

by FunkyMonk (Canon)
on Mar 26, 2009 at 23:38 UTC ( #753543=note: print w/ replies, xml ) Need Help??


in reply to What is the best way to install CPAN modules on Debian?

I use Debian/testing aka squeeze and I've got ~300 non-Debian CPAN packages installed, all as .deb's using dh-make-perl. FWIW my workflow{1} is:

  1. cd <<cpanplus build directory>>
  2. cpanp t Module::To::Install download & test the module and all dependencies
  3. dh-make-perl --version <<module-version>>-0.0 --build <<directory>> for each directory created by cpanp. (Some fail, and some succeed.)
  4. su -c 'dpkg -i *.deb' Install those that succeeded
  5. Repeat 3 & 4 until all the modules are installed
It's a long way from being perfect, but it works for me.

{1} Scripted, of course:

#!/usr/bin/perl use 5.010; use strict; use warnings FATAL => 'all'; run(); sub run { fetch_and_test($_) for @ARGV; for my $dir (grep -d, glob "*") { system qw[rm -rf], "$dir/debian" if -e "$dir/debian"; my ($module, $ver) = $dir =~ m/(.*)-(.*)/; my $deb = lc "lib$module-perl"; system(qw/dh-make-perl --version/, "$ver-0.0", "--build", $dir +) == 0 and system qw/rm -rf/, $dir; #created a deb } } sub fetch_and_test { my $module = shift; system qw[ cpanp s conf prereqs 1; ], "t", $module; }


Comment on Re: What is the best way to install CPAN modules on Debian?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://753543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2015-07-04 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls