jkeenan1 has asked for the wisdom of the Perl Monks concerning the following question:

Let's suppose that I am taking over maintenance of a CPAN distribution from its author or previous maintainer. Is there a practical way to search CPAN to uncover modules which use the module I'm now maintaining?

Granted, I could go to search.cpan.org and fill in my module's name in the "All" pane. But that only returns a list in the form of a web page. I'd like something more like that site's "grep" tool, i.e., something that would show me files and line numbers -- but for all of CPAN at once rather than one distro at a time. And I'd like something that returns plain-text so it's easy to manipulate further.

It seems like this should have been invented already. Ideas?

Thank you very much.

Jim Keenan
  • Comment on Searching CPAN for instances of dependencies on a module

Replies are listed 'Best First'.
Re: Searching CPAN for instances of dependencies on a module
by Corion (Patriarch) on May 19, 2006 at 11:31 UTC

    There is Gonzui, which indexes all of CPAN and which is very convenient to have when scanning for certain constructs of code or module usage. I have the following as a browser "keyword" which allows me to search from the browser bar:

    http://cpansearch.bulknews.net/search?q=%s&fm=all

    Additionally, you can use the CPANTS database, which also lists the prerequisites I think.

      Gonzui hit the spot. Thanks, Corion.

      Jim Keenan
Re: Searching CPAN for instances of dependencies on a module
by davorg (Chancellor) on May 19, 2006 at 11:57 UTC

    CPANTS has a kwalitee measure that checks whether a module is a pre-requisite of any other module. So there's probably something in the CPANTS generator that does what you want.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      At some point since May (the last posting in this thread), the CPANTS folks apparently decided to make this feature more prominent.

      I searched for one of my own modules and was pleasantly surprised to see that it's required by other modules I had never heard of! So now, discovering your dependencies is a snap!

      Of course, the downside of that is: I better make certain I don't break anything in those modules if I make revisions to mine!

      Jim Keenan