前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >perl dancer 基础4

perl dancer 基础4

作者头像
franket
发布于 2022-03-25 09:23:35
发布于 2022-03-25 09:23:35
37600
代码可运行
举报
文章被收录于专栏:技术杂记技术杂记
运行总次数:0
代码可运行

安装Expect模块

配置cpan

首先要配置cpan

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@dancer-test ~]# perl -MCPAN -e shell 
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
some missing parameters...



The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.



I see you already have a  directory
    /root/.cpan
Shall we use it as the general CPAN build and cache directory?

 <cpan_home>
CPAN build and cache directory? [/root/.cpan] 

Unless you are accessing the CPAN on your filesystem via a file: URL,
CPAN.pm needs to keep the source files it downloads somewhere. Please
supply a directory where the downloaded files are to be kept.

 <keep_source_where>
Download target directory? [/root/.cpan/sources] 

 <build_dir>
Directory where the build process takes place? [/root/.cpan/build] 

Normally CPAN.pm keeps config variables in memory and changes need to
be saved in a separate 'o conf commit' command to make them permanent
between sessions. If you set the 'auto_commit' option to true, changes
to a config variable are always automatically committed to disk.

 <auto_commit>
Always commit changes to config variables to disk? [no] yes

CPAN.pm can limit the size of the disk area for keeping the build
directories with all the intermediate files.

 <build_cache>
Cache size for build directory (in MB)? [100] 1000

The CPAN indexes are usually rebuilt once or twice per hour, but the
typical CPAN mirror mirrors only once or twice per day. Depending on
the quality of your mirror and your desire to be on the bleeding edge,
you may want to set the following value to more or less than one day
(which is the default). It determines after how many days CPAN.pm
downloads new indexes.

 <index_expire>
Let the index expire after how many days? [1]    

By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync. To prevent this, answer
'never'.

 <scan_cache>
Perform cache scanning (atstart or never)? [atstart] 

To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable is
not available, the normal index mechanism will be used.

Note: this mechanism is not used when use_sqlite is on and SQLLite is
running.

 <cache_metadata>
Cache metadata (yes/no)? [yes] 

The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

 <prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [ask] 

Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, UNINST or the like) you want to
pass to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Typical frequently used settings:

    PREFIX=~/perl    # non-root users (please see manual for more hints)

 <makepl_arg>
Parameters for the 'perl Makefile.PL' command? [INSTALLDIRS=site] 

Parameters for the 'make' command? Typical frequently used setting:

    -j3              # dual processor system (on GNU make)

 <make_arg>
Your choice: [] 

Parameters for the 'make install' command?
Typical frequently used setting:

    UNINST=1         # to always uninstall potentially conflicting files

 <make_install_arg>
Your choice: [] 

A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.

Typical frequently used settings:

    --install_base /home/xxx             # different installation directory

 <mbuildpl_arg>
Parameters for the 'perl Build.PL' command? [--installdirs site] 

Parameters for the './Build' command? Setting might be:

    --extra_linker_flags -L/usr/foo/lib  # non-standard library location

 <mbuild_arg>
Your choice: [] 

Do you want to use a different command for './Build install'? Sudo
users will probably prefer:

    su root -c ./Build
 or
    sudo ./Build
 or
    /path1/to/sudo -u admin_account ./Build

 <mbuild_install_build_command>
or some such. Your choice: [./Build] 

Parameters for the './Build install' command? Typical frequently used
setting:

    --uninst 1                           # uninstall conflicting files

 <mbuild_install_arg>
Your choice: [] 



If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 <ftp_proxy>
Your ftp_proxy? [] 

 <http_proxy>
Your http_proxy? [] 

 <no_proxy>
Your no_proxy? [] 

CPAN needs access to at least one CPAN mirror.

As you did not allow me to connect to the internet you need to supply
a valid CPAN URL now.

Please enter the URL of your CPAN mirror  http://mirrors.163.com/cpan/
Configuration does not allow connecting to the internet.
Current set of CPAN URLs:
  http://mirrors.163.com/cpan/
Enter another URL or RETURN to quit: [] http://mirrors.sohu.com/CPAN/
Enter another URL or RETURN to quit: [] ftp://mirrors.ustc.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.ustc.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] rsync://mirrors.ustc.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] ftp://mirrors.xmu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.xmu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] rsync://mirrors.xmu.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.hust.edu.cn/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.neusoft.edu.cn/cpan/
Enter another URL or RETURN to quit: [] ftp://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/
Enter another URL or RETURN to quit: [] http://cpan.communilink.net/
Enter another URL or RETURN to quit: [] http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/
Enter another URL or RETURN to quit: [] http://mirrors.devlib.org/cpan/
Enter another URL or RETURN to quit: [] 
New urllist
  http://mirrors.163.com/cpan/
  http://mirrors.sohu.com/CPAN/
  ftp://mirrors.ustc.edu.cn/CPAN/
  http://mirrors.ustc.edu.cn/CPAN/
  rsync://mirrors.ustc.edu.cn/CPAN/
  ftp://mirrors.xmu.edu.cn/CPAN/
  http://mirrors.xmu.edu.cn/CPAN/
  rsync://mirrors.xmu.edu.cn/CPAN/
  http://mirrors.hust.edu.cn/CPAN/
  http://mirrors.neusoft.edu.cn/cpan/
  ftp://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/
  http://cpan.communilink.net/
  http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/
  http://mirrors.devlib.org/cpan/


commit: wrote '/usr/share/perl5/CPAN/Config.pm'

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> h

Display Information                                                (ver 1.9402)
 command  argument          description
 a,b,d,m  WORD or /REGEXP/  about authors, bundles, distributions, modules
 i        WORD or /REGEXP/  about any of the above
 ls       AUTHOR or GLOB    about files in the author's directory
    (with WORD being a module, bundle or author name or a distribution
    name of the form AUTHOR/DISTRIBUTION)

Download, Test, Make, Install...
 get      download                     clean    make clean
 make     make (implies get)           look     open subshell in dist directory
 test     make test (implies make)     readme   display these README files
 install  make install (implies test)  perldoc  display POD documentation

Upgrade
 r        WORDs or /REGEXP/ or NONE    report updates for some/matching/all modules
 upgrade  WORDs or /REGEXP/ or NONE    upgrade some/matching/all modules

Pragmas
 force  CMD    try hard to do command  fforce CMD    try harder
 notest CMD    skip testing

Other
 h,?           display this menu       ! perl-code   eval a perl command
 o conf [opt]  set and query options   q             quit the cpan shell
 reload cpan   load CPAN.pm again      reload index  load newer indices
 autobundle    Snapshot                recent        latest CPAN uploads
cpan[2]> 

Note:

  • 1.要将配置保存,否则下次还要再配置
  • 2.主要关心一下 cpan mirror 的配置

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
Cisco Catalyst 3750 配置自动备份
交换机的配置信息十分关键,如果可以对这类信息进行自动备份并且进行版本控制就可以有效降低生产风险
franket
2021/08/12
7840
memcahced perl 测试
  'urllist' => [q[http://mirrors.ustc.edu.cn/CPAN/]],
星哥玩云
2022/07/03
1.1K0
脚本分享—将GenBank格式的文件转换为GFF3格式
小编欢乐豆又放出一个珍藏多年的脚本,2749 行的长度,长到已经难以用 GPT 解读啦,不过用起来还是很方便的!这个 perl 脚本用于将 GenBank 格式的文件转换为 GFF3 格式。
用户1075469
2024/01/26
4370
脚本分享—将GenBank格式的文件转换为GFF3格式
在windows上搭建镜像yum站的方法(附bat脚本)
惨绿少年
2017/12/27
2.9K0
在windows上搭建镜像yum站的方法(附bat脚本)
容器技术|Docker三剑客之docker-machine
ocker-machine就是docker公司官方提出的,用于在各种平台上快速创建具有docker服务的虚拟机的技术,甚至可以通过指定driver来定制虚拟机的实现原理(一般是virtualbox)。
民工哥
2020/09/16
5920
容器技术|Docker三剑客之docker-machine
技术分享 | MySQL Test 初探
MySQL Test 是 MySQL 发行版本中集成 all-in-one 测试框架,用于做 mysql 服务的单元,回归和一致性测试,并提供了运行单元测试和创建新单元测试的工具。
爱可生开源社区
2020/04/08
1.5K0
brew安装nvm、node及配置
然后添加这一段到 ~/.bash_profile 或者 ~/.zshrc(没有就创建):
阿超
2023/07/08
1.9K0
centos国内源总结
有时候centos使用yum命令的时候软件下载速度会很慢,还好国内有很多镜像站供大家选择,在此博主为大家总结了一些centos国内镜像站,如果你需要下载centos的iso文件或者相关软件,可以到以下网站下载,速度相当快!
老高的技术博客
2022/12/27
1.4K0
Dockerfile实例
Debian软件包的包名叫 deb ,类似于rpm包; deb 包的管理方式有 dpkg 、apt 两种方式deb包。对于软件管理有dpkg apt两种:
Alone-林
2023/03/17
4850
Dockerfile实例
日志服务器(3)
设置mysql密码 [root@h105 mysql]# /etc/init.d/mysql start Starting MySQL (Percona Server)... [ OK ] [root@h105 mysql]# mysqladmin -uroot password 'mysql' Warning: Using a password on the command line interface can be insecure. [root@
franket
2021/10/19
5470
perl dancer 基础6
安装Expect 可以使用下面方法安装 cpanm cpanm Expect CPAN shell perl -MCPAN -e shell install Expect 或直接在cpan中进行安装 cpan[2]> install Expect CPAN: Storable loaded ok (v2.20) CPAN: LWP::UserAgent loaded ok (v5.833) CPAN: Time::HiRes loaded ok (v1.9721) Fetching with LWP:
franket
2022/03/25
2.1K0
中国开源镜像
China    Alibaba Cloud Computing    http://mirrors.aliyun.com/centos/ 阿里巴巴         China    Beijing Institute of Technology    http://mirror.bit.edu.cn/centos/ 北京理工大学         China    Beijing Teletron Telecom Engineering    http://mirrors.btte.net/centos/     北京电子电信工程     China    BitComm Ltd.    http://mirrors.pubyun.com/centos/ 公云         China    CDS China    http://mirrors.yun-idc.com/centos/    ftp://mirrors.yun-idc.com/centos/    rsync://mirrors.yun-idc.com/centos/ 首都在线 China    China University of Geosciences    http://mirrors.cug.edu.cn/centos/         中国地质大学 China    Dalian Neusoft University of Information    http://mirrors.neusoft.edu.cn/centos/    ftp://mirrors.neusoft.edu.cn/centos/     东软 China    Grand Cloud    http://mirrors.grandcloud.cn/centos/     盛大云     China    Huazhong University of Science and Technology    http://mirrors.hust.edu.cn/centos/        rsync://mirrors.hust.edu.cn/centos/ 华中科技大学 China    NetEase    http://mirrors.163.com/centos/     网易     China    Northeastern University, Shenyang Liaoni    http://mirror.neu.edu.cn/centos/ 东北大学         China    Qiming College of Huazhong University of Science and Technology    http://mirrors.hustunique.com/centos/        rsync://mirrors.hustunique.com/centos/ 华中科技大学 China    Sohu Inc, Beijing P.R. China    http://mirrors.sohu.com/centos/         搜狐 China    The Linux open source community mirror    http://mirrors.skyshe.cn/centos/        rsync://mirrors.skyshe.cn/centos/ 中国linux开源社团 China    University of Science and Tech of China    http://centos.ustc.edu.cn/centos/ 中国科技大学         China - Hong Kong     Web Services Ltd.    http://mirror.vpshosting.com.hk/pub/linux/centos/    ftp://mirror.vpshosting.com.hk/pub/linux/centos/     Hong Kong    01LINK NETWORK SERVICES LIMITED    http://centos.01link.hk/    ftp://centos.01link.hk/    rsync://centos.01link.hk/centos/ Hong Kong    CommuniLink Internet Limited    http://centos.communilink.net/    ftp://centos.communilink.net/centos/     Hong Kong    i-System Technology Limited    http://centos.uhost.h
三杯水Plus
2018/11/14
3.8K1
官方源、镜像源汇总
部分摘录自:http://blog.csdn.net/wh211212/article/details/53593057
惨绿少年
2018/07/31
6.1K0
官方源、镜像源汇总
【CTFd】靶场安装与配置(Docker一键配置版)
【CTFd】靶场安装与配置这由于上一次的配置有点小问题,主要是Whale插件不再支持CTFd3.x版本,于是找了个新的插件使用 并且找到了更好的解决方式,不用那么麻烦配环境了 CTFd-Whale最新维护仓库 这次我采用Docker一键部署,并且稍加改动添加了中文包 成果图
正汰
2024/01/16
1.1K0
【CTFd】靶场安装与配置(Docker一键配置版)
install_driver(mysql) failed
    安装好了mysql监控神器innotop,正得意,innotoop不可用,其错误提示为install_driver(mysql) failed: Can't load '/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.15: cannot open shared object  file:...经查原有又是DBD惹的祸,这个问题已经发生过好几次了。 1、故障现象 [root@dbsrv1 ~]# cat /etc/issue CentOS release 5.11 (Final) Kernel \r on an \m [root@dbsrv1 ~]# innotop localhost PROCESSLIST_NO_IS: install_driver(mysql) failed: Can't load '/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.15: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230. at (eval 504) line 3 Compilation failed in require at (eval 504) line 3. Perhaps a required shared library or dll isn't installed where expected  at /usr/bin/innotop line 7601 2、安装perl-DBD-MySQL [root@dbsrv1 ~]# yum install perl-DBD-MySQL Loaded plugins: fastestmirror, security Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository contrib is listed more than once in the configuration Loading mirror speeds from cached hostfile  * base: mirrors.163.com  * epel: mirrors.ustc.edu.cn  * extras: mirrors.skyshe.cn  * updates: mirrors.pubyun.com Setting up Install Process Package perl-DBD-MySQL-3.0007-2.el5.x86_64 already installed and latest version Nothing to do ###上面描述已经perl-DBD-MySQL已经安装,且为最新的版本 [root@dbsrv1 yum.repos.d]# rpm -qa |grep -i dbd perl-DBD-MySQL-3.0007-2.el5 ###首先先卸载perl-DBD-MySQL,然后再次使用yum安装 [root@dbsrv1 yum.repos.d]# rpm -e --nodeps perl-DBD-MySQL-3.0007-2.el5 [root@dbsrv1 yum.repos.d]# rpm -qa |grep -i dbd [root@dbsrv1 yum.repos.d]# yum install perl-DBD-MySQL Loaded plugins: fastestmirror, security Repository base is listed more than once in the configuration Reposit
Leshami
2018/08/13
7620
厦门大学不再提供R语言镜像
深感遗憾,我以前的教程还特意选择了他,比如下面的安装最新版R语言: sudo vi /etc/apt/sources.list# deb http://mirrors.xmu.edu.cn/CRAN/bin/linux/ubuntu/ xenial/sudo apt-get updatesudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9sudo apt-get updatesudo apt-get in
生信技能树
2018/03/09
1.5K0
厦门大学不再提供R语言镜像
CentOS 6.5下源码安装GCC-4.8.2安装笔记整理
经历了两天的虐心,写了两篇不敢发表的gcc4.8.2安装笔记,终于成功用源码安装最新的gcc-4.8.2,虽然最初只是为了试一试c++11的几个性能,但是后来不断遇到的问题和搜索中发现的这些问题在大家安装过程中的普遍存在,决心把它写下来和大家共享,鄙人也是个菜鸟,有什么说的不对的地方希望大家予以指正,不胜感激:
知忆
2021/06/07
1.3K0
日志分析工具Awstats实战之Nginx篇
前言: Awstats 是在 SourceForge 上发展很快的一个基于 Perl 的 WEB 日志分析工具,一个充分的日志分析让 Awstats 显示您下列资料: 访问次数、独特访客人数, 访问时间和上次访问, 使用者认证、最近认证的访问, 每周的高峰时间(页数,点击率,每小时和一周的千字节), 域名/国家的主机访客(页数,点击率,字节,269域名/国家检测, geoip 检测), 主机名单,最近访问和未解析的 IP 地址名单 大多数看过的进出页面, 档案类型, 网站压缩统计表(mod_gzip 或者 mod_deflate), 使用的操作系统 (每个操作系统的页数,点击率 ,字节, 35 OS detected), 使用的浏览器, 机器人访问(检测 319 个机器人), 蠕虫攻击 (5 个蠕虫家族), 搜索引擎,利用关键词检索找到你的地址, HTTP 协议错误(最近查阅没有找到的页面), 其他基于 URL 的个性报导,链接参数, 涉及综合行销领域目的. 贵网站被加入"最喜爱的书签".次数. 屏幕大小(需要在索引页补充一些 HTML 标签). 浏览器的支持比例: Java, Flash, RealG2 reader, Quicktime reader, WMA reader, PDF reader. 负载平衡服务器比率集群报告.
星哥玩云
2022/06/11
1.2K0
日志分析工具Awstats实战之Nginx篇
ubuntu更换源
源就是用来apt-get下载软件的网址 不同的网络状况连接以下源的速度不同, 建议在添加前手动验证以下源的连接速度(ping下就行),选择最快的源可以节省大批下载时间。 首先备份源列表: sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 而后用gedit或其他编辑器打开: sudo gedit /etc/apt/sources.list 从下面列表中选择合适的源,替换掉文件中所有的内容,保存编辑好的文件: 注意:一定要选对版本 然后,刷新列表: sudo apt-get update 注意:一定要执行刷新 源列表
用户1148523
2019/05/27
6.4K0
Python3.7开发环境安装
之前讲Python3(3.6.x)基础的过程中,Python3.7发布了,当时说很多第三方库没更新全,现在可以安装了。
逸鹏
2018/08/14
1.9K0
相关推荐
Cisco Catalyst 3750 配置自动备份
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文