# 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/
remote: $YOUR_PREFERED_CPAN_MIRROR
exact_mirror: 1
__END__
$ mkdir $HOME/.mcpani
$ cat > $HOME/.mcpani/config << __END__
local: /data/minicpan/
remote: $YOUR_PREFERED_CPAN_MIRROR
exact_mirror: 1
repository: /data/minicpan.private/
__END__
$ 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 (http://domm.plix.at/talks/cpanplus_custom_sources.html)