[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Finding deb packages for given Perl modules

gregor herrmann <gregoa@debian.org> writes:

> On Thu, 18 Sep 2014 19:30:00 +0800, Paul Wise wrote:
>> > I found that you might know an answer: Is there a command line tool that
>> > checks a cpanfile to query packages.debian.org and list matching debian
>> > packages that include the required version of this module?
>> It doesn't appear to versions but:
>> dh-make-perl locate Foo::Bar
> There's also a web interface, created by Jozef Kutej:
> http://deb.perl.it/
> And I'm using a simple shell function:
> % which afsp
> afsp () {
>     apt-file search $(echo "/$@" | sed -e 's|::|/|g ; s|-|/|g ; s|$|.pm|') | uniq
> }
> (Also no version here.)
> Cheers,
> gregor

The plain old apt-cache search works for me.

For example the following command searches and lists Debian packages for
CPAN module Acme::Bleach

ppm@nono:~$ apt-cache search Acme::Bleach
libacme-bleach-perl - Perl module for really clean programs
libacme-eyedrops-perl - funny way for visual programming in Perl

Similarly the following command searches for CPAN module Task::Kensho
and shows that it is not available (it should be :)

ppm@nono:~$ apt-cache search Task::Kensho
ppm@nono:~$ echo $?

But why the exit status of apt-cache is 0 (success) when no package is
found is an interesting question.

Hope it helps,

Reply to: