minicpan+cpaninject

jk2addict on 2007-12-28T02:59:51

Just thinking out loud. I have minicpan to mirror to my laptop, to whit I point my cpan shell, and all of my Parallels guest OS CPAN shells to install dists.

Then there's cpaninject, which allows me to inject a dev version into my local CPAN cache, but what I really need is to inject into my minicpan mirror for all to use.

I see the options to set destination directories in CPAN::Inject. I can write a script that groks the same settings minicpan uses to find a mirror directory. Seems like I wouldn't be the only one to want to do this.

What about instead, a new option to minicpan itself?

minicpan -i my-dist-0.01.tar.gz that injects into the mirror?


You have your history backwards...

Alias on 2007-12-28T04:07:53

CPAN::Mini::Inject was the original inspiration for CPAN::Inject, and does exactly what are talking about.

It drops modules into the mini-cpan mirror and updates the index files.

Re:You have your history backwards...

jk2addict on 2007-12-28T13:41:20

Heh...and you were even there on irc... sigh. :-)

Re:You have your history backwards...

jk2addict on 2007-12-28T14:51:36

I changed my mind. No offense to the author, but it's old (2005) and it's over complicated compared to CPAN::Inject. It doesn't even read the same config that minicpan uses (~/.minicpan):

mcpani will search the following four places in order:

    * file pointed to by the environment variable MCPANI_CONFIG
    * $HOME/.mcpani/config
    * /usr/local/etc/mcpani
    * /etc/mcpani

I still vote that CPAN::Mini/minicpan add a -i that simply sets CPAN::Inject->sources from it's config and runs with it.