in reply to Private Module Repository

OK, you can actually do this. The problem is that if you really know what you're doing, it's trivial to get this working, and if you don't you have to learn an awful lot about how the everything works through trial and error. This could be eliminated if mcpani autodetected an empty dir and setup the appropriate files (it only does this when you specify --mirror, which will suck down the universe).

Here's what I did:

  1. Inside CPAN empty dir, create authors and modules dirs.
  2. touch authors/01mailrc.txt.gz
  3. touch modules/02packages.details.txt.gz
  4. touch modules/03modlist.data.gz
  5. use mcpani to --add your pkg
  6. mcpani --inject -v
This will create a valid "micro CPAN" with just a couple of packages in it. For a secure server, try using sshfs and fuse to mount a remote ssh directory, and make it look like a normal directory.

cpanp needs a little help next. First you add "custom source" and use file:///yourcpan (obvious part). Next, you need to help cpanp find your file by installing "package-with-dashes-and-version". The version is seems to be necessary, otherwise it will just stick with an old version.

Does anyone know how to make cpanp realize that there is a new version of a local package (so we don't have to specify the version at the prompt)?