[Israel.pm] mixing CPAN.pm and apt-get
Gaal Yahas
gaal at forum2.org
Tue May 29 08:53:16 EEST 2007
On 5/29/07, Gabor Szabo <szabgab at gmail.com> wrote:
> The problem I encounter is when a module which is not available as .deb
> and thus I need to install it using CPAN.pm has dependencies which are
> available as .deb packages.
> Right now the only thing I can do is to tell CPAN.pm to "ask" for
> every dependency, check manually if .deb is available and then do the
> right thing.
I don't have a good solution but here are some tools I use:
# create .debs from CPAN:
apt-get install dh-make-perl
dh-make-perl --cpan Some::New::Module --install --requiredeps
# filter a Perl-style modules into deb-style names. Useful for copy-pasting
# dependency lists from CPAN.pm to xargs apt-get install
perl -nle 'print d($1) if /([A-Z][:\w]+)/; sub d { (my $m = shift) =~
s/::/-/g; lc "lib$m-perl" }'
The filter is of course quick'n'dirty! Ideally someone with tuits could hack
dh-make-perl to follow dependencies, at least those mentioned explicitly
in the META.yml file...
--
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
More information about the Perl
mailing list