Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jozef (8299)

  (email not shown publicly)

Journal of jozef (8299)

Friday April 24, 2009
05:15 AM

local CPAN for the company

[ #38861 ]
# this will be a howto setup a local CPAN mirror
# that can be used together with closed source
# tar balls to have one local CPAN repository to
# install all modules from

# lines starting with $ are the commands to
# execute, # are comments (just to make sure)

# replace $YOUR_PREFERED_CPAN_MIRROR with your
# favourite CPAN mirror url and change the paths
# to your taste

# :-P

# --- cut ---

$ mkdir -p /data/minicpan
$ mkdir -p /data/minicpan.private/
$ mkdir -p /data/incoming

$ cpan -i CPAN::Mini::Inject

$ cat > $HOME/.minicpanrc << __END__
local:  /data/minicpan/
exact_mirror: 1

$ mkdir $HOME/.mcpani
$ cat > $HOME/.mcpani/config << __END__
local:  /data/minicpan/
exact_mirror: 1
repository: /data/minicpan.private/

$ mcpani --add --module Local::Module::Name --authorid LOCAL --modversion 0.01 --file /data/incoming/Local-Module-Name-0.01.tar.gz

$ mcpani --update -v    # you would most likely want to cron-ify this

$ cpan -i CPAN::Mini::Webserver
$ minicpan_webserver &

# browse to http://localhost:2963/ and enjoy your
# local modules Pod :-)

# setup web server to server content of /data/minicpan

$ cpan
# type in: o conf urllist unshift http://localhost/minicpan/
# type in: o conf commit

# --- cut ---

# was not that dificult after all, was it? just a
# note `du -sh /data/minicpan` => 1.1G

# TIMTIWTFI => CPANPLUS custom sources (
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.