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

Re: CPAN modules used by non-CPAN packages



I too wonder if there is a 'proper' way to go from perl module name to deb

as in my Foswiki extensions debian build script, I do some pretty
simplistic looking using apt-cache, and then have a hand added list for
those I notice don't get found magically.


( resulting in http://fosiki.org/Foswiki_debian )

Sven

        #try to convert from Perl name to debian name
        #then test for availability?
        my $pkgname = 'lib' . lc($depName);
        $pkgname =~ s/::/-/g;
        my $cmd = 'apt-cache search ' . $pkgname . ' | grep perl';

        #print "DEPENDENCIES: ====== $cmd \n";
        my @pkgs = `$cmd`;

        #print  "  $pkgname found : ".join('; ', @pkgs)."\n";
        if (   ( scalar(@pkgs) == 1 )
            && ( defined( $pkgs[0] ) )
            && ( $pkgs[0] ne '' ) )
        {
            $pkgs[0] =~ s/^(\S*)\s.*$/$1/;
            $pkgs[0] =~ s/\n//;


Gabor Szabo wrote:
> Hi,
>
> so the http://ali.as/top100/ lists the top 100 modules that are used
> by the biggest number of other things in CPAN.
>
> It does not take in account anything that is not on CPAN.
>
> I'd like to provide some improvement to this by collecting
> the dependency information from Debian.
> I'd like to gather the list of packages that use CPAN modules.
>
> How can I do that?
>
> e.g. Bugzilla is packaged by Debian
> How can I list all the modules it uses ?
>
> In the opposite direction given a CPAN module
> how can I find all the Debian packages
> depending on that package?
>
>
> Gabor
>
>
>   


Reply to: