cpanm安装及Perl模块安装教程(perfdump软件)难以置信

随心笔谈2个月前发布 admin
211 00
🌐 经济型:买域名、轻量云服务器、用途:游戏 网站等 《腾讯云》特点:特价机便宜 适合初学者用 点我优惠购买
🚀 拓展型:买域名、轻量云服务器、用途:游戏 网站等 《阿里云》特点:中档服务器便宜 域名备案事多 点我优惠购买
🛡️ 稳定型:买域名、轻量云服务器、用途:游戏 网站等 《西部数码》 特点:比上两家略贵但是稳定性超好事也少 点我优惠购买

文章摘要

这篇文章介绍了`cpanm`命令行工具的主要功能和选项,帮助用户了解如何通过这些选项进行配置和操作。`cpanm`提供了多种控制输出、安装依赖、测试、配置交互模式等选项,支持从本地或外部源安装软件包,并可以根据需求选择安装依赖、只测试或不安装测试。通过`--interactive`选项,用户可以进入交互模式配置任务模块。此外,`cpanm`还支持从镜像源下载软件包、仅安装依赖项、显示依赖信息、重新安装软件包以及自定义安装路径等操作。文章还提供了多个示例,展示了如何使用这些选项来安装不同的软件包。通过这些功能,`cpanm`为用户提供了高度灵活和强大的软件包管理工具。

# cpanm -h

  -v,–verbose              Turns on chatty output

  -q,–quiet                Turns off the most output

  –interactive             开启交互配置(required for Task:: modules)

  -f,–force                强制安装

  -n,–notest               Do not run unit tests

  –test-only               只测试不安装

  -S,–sudo                 sudo to run install commands

  –installdeps             只安装依赖模块

  –showdeps                只显示依赖信息

  –reinstall               重新安装

  –mirror                  指定镜像url (e.g. http://cpan.cpantesters.org/)

  –mirror-only             只从镜像下载

  –prompt                  Prompt when configure/build/test fails

  -l,–local-lib            Specify the install base to install modules

  -L,–local-lib-contained  Specify the install base to install all non-core modules

  –self-contained          Install all non-core modules, even if they’re already installed.

  –auto-cleanup            Number of days that cpanm’s work directories expire in. Defaults to 7

  Examples:

  cpanm Test::More                                          # install Test::More

  cpanm MIYAGAWA/Plack-0.99_05.tar.gz                       # full distribution path

  cpanm http://example.org/LDS/CGI.pm-3.20.tar.gz           # install from URL

  cpanm ~/dists/MyCompany-Enterprise-1.00.tar.gz            # install from a local file

  cpanm –interactive Task::Kensho                          # Configure interactively

  cpanm .                                                   # install from local directory

  cpanm –installdeps .                                     # install all the deps for the current directory

  cpanm -L extlib Plack                                     # install Plack and all non-core deps into extlib

  cpanm –mirror http://cpan.cpantesters.org/ DBI           # use the fast-syncing mirror

© 版权声明

相关文章