1 Star 0 Fork 1

F.Y/perl_dnspod_ddns

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
require.pl 1004 Bytes
一键复制 编辑 原始数据 按行查看 历史
F.Y 提交于 2015-01-17 20:49 . Update require.pl
#!/bin/bash
cpanm="/bin/cpanm";
if [ ! -f $cpanm ];then
# wget http://xrl.us/cpanm -O $cpanm;
wget -O $cpanm --no-check-certificate https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm
fi
if [ ! -x $cpanm ];then
chmod +x $cpanm
fi
echo "must install openssl-devel";
apt-get -y install libssl-dev
yum -y install openssl-devel
#! -*-perl-*-
eval 'exec perl -x -wS $0 ${1+"$@"}'
if 0;
use strict;
my @packages=(
'Moo',
'Smart::Comments',
'JSON',
'HTTP::Tiny',
'Net::SSLeay',
'IO::Socket::SSL',
'File::Slurp',
'App::Daemon',
'Proc::Fork'
);
print "You must be root to run this program\n" and exit 1 unless ($> == 0);
foreach my $module ( @packages ) {
unless (eval { require $module }) {
print "Need to install [ $module ] module. I'll do that for you now:\n";
my $ret = system("/bin/cpanm --mirror http://mirrors.163.com/cpan --mirror-only -n $module");
print $ret;
print "if intstall perl module has error ,please try: cpanm -f <module>\n"
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Perl
1
https://gitee.com/fy138/perl_dnspod_ddns.git
[email protected]:fy138/perl_dnspod_ddns.git
fy138
perl_dnspod_ddns
perl_dnspod_ddns
master

搜索帮助