-
Notifications
You must be signed in to change notification settings - Fork 587
Installation of cpan modules by cpanm and cpanfile
yuki-kimoto edited this page Mar 19, 2013
·
2 revisions
Donwload cpanm.
curl -LO http://xrl.us/cpanmWrite cpanfile. cpanfile is file to specify module version. Let's create file which name is cpanfile.
Example:
requires 'DBI', '== 1.619';
requires 'DBD::SQLite', '== 1.36_04';
requires 'DBIx::Custom', '== 0.25';Syntax:
requires MODULE_NAME VERSIONYou can use the following version expression.
<MEANING> <EXPRESION> <EXAMPLE>
equel == VERION == 0.03
greater than or equel VERSION or >= VERSION 0.03 or >= 0.03
lower than or equel <= VERSION <= 0.03
greater than > VERSION > 0.03
lower than < VERSION < 0.03You can install modules using cpanfile in current directory by --installdeps option of cpanm.
perl cpanm --installdeps .You can also install modules into specified directory by -L option.
perl cpanm -L extlib --installdeps .