Set up CPAN::Mini
- Install the CPAN::Mini module.
- Create the file structure where the mini CPAN be.
- Create the config file lib/CPAN/Mini/minicpan.conf (this is needed particularly for using CPAN::Mini::Webserver) with the following contents.
- Set the CPAN_MINI_CONFIG environment variable to point to
lib/CPAN/Mini/minicpan.conf
. (Even though the conf file was created in a default location, this is not recognised in Windows.)
D:/www/MINICPAN D:/www/MINICPAN/authors D:/www/MINICPAN/authors/01mailrc.txt.gz (empty file) D:/www/MINICPAN/modules D:/www/MINICPAN/modules/02packages.details.txt.gz (empty file)
local: D:/www/MINICPAN/ remote: http://mirror.optusnet.com.au/CPAN/ # or some other mirror from http://www.cpan.org/SITES.html exact_mirror: 1
I didn't execute minicpan, because I only wanted my own private modules in here. But if I were to run it (which would have set up the mini CPAN for me):
minicpan -l D:/www/MINICPAN/ -r http://mirror.optusnet.com.au/CPAN/ # or some other mirror from http://www.cpan.org/SITES.html
Set up the webserver
- Install CPAN::Mini::Webserver module
- Execute
minicpan_webserver
Set up CPAN::Mini::Inject
- Install the CPAN::Mini::Inject module.
- Create the config file D:/.mcpani/config with the following contents.
- Set the MCPANI_CONFIG environment variable to
D:\.mcpani\config
.
local: D:/www/MINICPAN remote: ftp://ftp.cpan.org/pub/CPAN ftp://ftp.kernel.org/pub/CPAN repository: D:/MINICPAN passive: yes dirmode: 0755
Using the mini CPAN
- Upload modules to the mini CPAN.
- Install modules from the mini CPAN (using cpanminus).
# add your modules to a repository mcpani --add --module My::Module --authorid STEVENL --modversion 0.001 --file My-Module-0.001.tar.gz # upload the repository modules into mini CPAN mcpani --inject
cpanm --mirror file://D:/www/MINICPAN My::Module cpanm --mirror http://[SERVER:PORT] My::Module
very good explanation, but not worjing under windows 7:
ReplyDeletecpanm --mirror c:\Users\TOSH\Documents\GitHub\mirror --mirror-only Genealogy::Gedcom
! cannot open file '/.cpanm/sources/c%Users%TOSH%Documents%GitHub%mirror/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution Genealogy::Gedcom ()