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

Hi, Our firm is trying to set up a local CPAN server which contains a standard CPAN mirror and a directory called "site" to store our private distributions. User can use CPAN::Site client to retrieve both standard CPAN modules and private distributions from this CPAN server. The question is how to manage this CPAN server automatically like what CPAN.org does: you just need to upload your distributions and server will put your distribution in right place and update index files automatically. Before writing our own CGI script to do this, I would like to know if there is existing script/tool to do this kind of thing. Thanks

Replies are listed 'Best First'.
Re: How to manage a local CPAN site
by cog (Parson) on Nov 02, 2006 at 02:51 UTC
Re: How to manage a local CPAN site
by stonecolddevin (Parson) on Nov 02, 2006 at 02:25 UTC

    Whooo...I would think that just creating your own namespace on CPAN would work better (given you can do such a thing, which i don't know why you wouldn't be able to.), seeing as how that would save TONS of time on setting up a whole new replica of the system. This way you can use CPAN's already existing and working system for organizing modules.

    P.S> If i'm off base with this, someone please don't hesitate to let me know, i don't have any experience with module distros and how they're maintained on CPAN, but this is just an assumption.

    meh.
      creating your own namespace on CPAN would work better (given you can do such a thing, which i don't know why you wouldn't be able to)

      Copyright, for instance?

      Just because a company is doing Perl doesn't mean they're willing to open their code to the public.

      Another possibility would be a "I don't want anyone looking at my code" kind of attitude. I don't agree it's the right attitude to have, but I've met a couple of people who thought like that.

      Yet another possibility would be if the code was something that wouldn't look good, out in the open (SPAM, for instance).

      I'm pretty sure there must be a ton of possible reasons why one wouldn't want his/her code on CPAN.

        D'oh, good thinking. I'm apparently on a one track OSS mind right now. Copyright's an excellent reason :-)

        Looking at http://cpan.org/SITES.HTML, I found this:

        Private/Local Mirroring If you want to configure a private/local mirror of CPAN but do not want to advertise it you do not need to contact the CPAN admistrators. You need to assess which of the public CPAN sites would give the best ftp bandwidth for you (at off-peak hours) and contact the mirror admin via the email address given in the MIRRORED.BY file to learn the best time of the day to do your mirror. Mirroring software is available from the CPAN or from the Mirror home page which will have the most recent version. We also encourage the use of rsync. We encourage you to read our FAQ Section on how to mirror CPAN and visit the mirror database to find a mirror close to you and to register yours with CPAN.
        It points you to the FAQ Section on how to mirror, which was going to be my next step as well :-)

        UPDATE: Looks like cog beat me to it, with better information. CPAN::Mini looks pretty fun, and simple to use. I'd start there as cog suggested.

        meh.