in reply to CPAN and module dependancies

To get the requirements for say, Date::Calc, use the following one-liner:
tar xfvzO Date-Calc-5.3.tar.gz Date-Calc-5.3/Makefile.PL | grep PR +EREQ_PM

I don't think it's a good idea to make any requirements for modules uploaded to CPAN. Modules uploaded to CPAN are a gift from their authors; we should be happy. Adding requirements will make that you'll lose some authors.

Abigail

Replies are listed 'Best First'.
Re: Re: CPAN and module dependancies
by l2kashe (Deacon) on Nov 05, 2002 at 19:53 UTC
    no no no... The other way..

    When an author uploads a module, they can add something to the effect of

    Module Dependancies:
    Net::FTP
    MIME::Base64
    Digest::MD5

    That way when you go to grab module A, you can check for modules b,c,d in your installation, and grab those as well if needed.

    Update: Ahh.. I see what you are saying, but wouldn't it make sense? I mean there have been times (notably Net::SSH::Perl), where I would have loved to know that I needed over a dozen other modules, prior to trying to get it working on a host.

    I hear what you are saying about possibly pushing authors away, but do you honestly think that will happen? I don't know what kind of reqs there are for getting your module on CPAN, but I can assume a simple find . -name "*.plm" -print | xargs grep "^use" wouldn't be that much more work..

    /* And the Creator, against his better judgement, wrote man.c */
      No, it doesn't make sense. The information is already provided, it's in Makefile.PL (assuming a proper Makefile.PL). And if you go to search.cpan.org, search for a module, and then browse it, you can see the content of Makefile.PL.

      If you still find this too much of a hassle, I suggest volunteering to write a patch for PAUSE that extracts the information from Makefile.PL and puts the information somewhere to your liking. No need to require authors to do redundant things.

      Abigail