$ cd ~/.cpan
o
$ cd $HOME/.cpan
Mediante el mismo comando perl es posible hacerlo:
$ perl -MCPAN -e "
Ejemplo:
$ perl -MCPAN -e "XML::DOM"
Tambien es posible hacerlo en forma interactiva usando el shell de perl:
$ perl -MCPAN -e shell
Luego es necesario indicarle al shell que hacer:
cpan> install modulo
Ejemplo:
cpan> install XML::DOM
Al iniciar la instalacion perl hara algunas preguntas relacionadas a su configuracion. La primera define la ubicacion del la ubicacion para construir modulos y cacheo:
I see you already have a directory
/home/.cpan
Shall we use it as the general CPAN build and cache directory?
CPAN build and cache directory? [/home/.cpan]
Si es correcta presionar ENTER y sino indicarla.
Lo mismo ocurre para la ubicacion de los fuentes:
Unless you are accessing the CPAN via the filesystem directly CPAN.pm
needs to keep the source files it downloads somewhere. Please supply a
directory where the downloaded files are to be kept. [/home/.cpan/sources]
Las restantes preguntas se listan a continuacion y la respuesta puede ser el default indicado entre corchetes:
Directory where the build process takes place? [/home/.cpan/build]
Always commit changes to config variables to disk? [no]
Cache size for build directory (in MB)? [100]
Let the index expire after how many days? [1] 7
Perform cache scanning (atstart or never)? [atstart]
Cache metadata (yes/no)? [yes]
Policy on building prerequisites (follow, ask or ignore)? [ask]
Parameters for the 'perl Makefile.PL' command?
Typical frequently used settings:
PREFIX=~/perl # non-root users (please see manual for more hints)
Your choice: []
Despues de actualizar la configuracion, perl intentara instalar el modulo. Primero lo descargara de alguno de los 'mirrors' configurados y luego lo construira y desplegara. En caso que el modulo se encuentre instalado y actualizado, aparecera el siguiente mensaje:
Going to read /home/.cpan/Metadata
Database was generated on Sun, 16 Dec 2007 10:37:55 GMT
XML::DOM is up to date (1.44)
No hay comentarios.:
Publicar un comentario