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

What steps do I need to take in order to create a personal CPAN server? The idea here is that I'm organizing my application into a number of CPAN-like distributions and I would like to be able to use CPAN to install them onto my production server(s). But, I cannot upload them to PAUSE because they contain company algorithms. I don't want to mirror CPAN - I want to have my own CPAN server that only contains my modules that is the first server in my CPAN search path.

I've already checked SuperSearch, google, www.cpan.org, and the Camel book, but there isn't much info on the internals of how CPAN works or what CPAN expects as an API.

------
We are the carpenters and bricklayers of the Information Age.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Personal CPAN server
by gellyfish (Monsignor) on Jan 19, 2004 at 15:26 UTC

    In the first instance I would take a look at CPAN::Site which provides a method of doing roughly what you want

    /J\

Re: Personal CPAN server
by derby (Abbot) on Jan 19, 2004 at 15:40 UTC
Re: Personal CPAN server
by Roger (Parson) on Jan 20, 2004 at 01:58 UTC
    I thought the CPAN server is just an FTP server, isn't it? I would just poke around inside the CPAN mirror and do some reverse engineering :-D

    
    CPAN.html                               1k Nov 19  2001 Symbolic link -> authors/id/J/JO/JONO/cpan.html
    ENDINGS                                 1k May  1  2001 Symbolic link -> .cpan/ENDINGS
    MIRRORED.BY                           123k Dec 16 11:42
    MIRRORING.FROM                          3k Jan 11 18:23
    README                                  1k May 26  2002
    README.html                             1k May  1  2001 Symbolic link -> index.html
    RECENT                                  1k May  1  2001 Symbolic link -> indices/RECENT-print
    RECENT.html                           175k Jan 11 03:34
    ROADMAP                                 1k May 26  2002
    ROADMAP.html                            1k May 26  2002
    SITES                                  21k Dec 16 11:42
    SITES.html                             42k Dec 16 11:42
    authors/                                7k Feb 17  2003 Directory
    clpa/                                   1k Aug 30  2002 Directory
    disclaimer.html                         2k Aug 30  2002
    doc/                                    1k Sep  8 20:34 Directory
    index.html                              3k Jan 10 22:01
    indices/                                1k Jan 11 18:26 Directory
    jhi/                                    1k Feb 18  2003 Directory
    ls-lR.gz                                1k May  1  2001 Symbolic link -> indices/ls-lR.gz
    misc/                                   1k Dec 27  2002 Directory
    
    modules/                                1k Oct  1 11:27 Directory          <<< looks interesting
    
    ports/                                  1k Jan  3 20:35 Directory
    scripts/                                1k May  9  2002 Directory
    src/                                    1k Nov 17 15:45 Directory
    


    The CPAN.pm module provides a standard interface to CPAN. There is a Defaultsite variable which can be overrided with your own FTP/CPAN server... I haven't tried this but it would certainly be an interesting little weekend project.
    use CPAN; $CPAN::Defaultsite = "ftp://mirror.aarnet.edu.au/pub/CPAN";
Re: Personal CPAN server
by neilwatson (Priest) on Feb 24, 2006 at 20:51 UTC
    Dragonchild, What was your solution? I'm in a similar position. I'd like to know what you did.

    Neil Watson
    watson-wilson.ca