如何在使用cpanp安装Perl模块时跳过依赖项?

如何在使用cpanp安装Perl模块时跳过依赖项?,perl,archlinux,Perl,Archlinux,尝试使用cpanp安装Apache::Singleton时出现以下错误: # cpanp i Apache::Singleton Installing Apache::Singleton (0.15) Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /

尝试使用
cpanp
安装
Apache::Singleton
时出现以下错误:

# cpanp i Apache::Singleton
Installing Apache::Singleton (0.15)
Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /root/.cpanplus/5.20.0/build/Apache-Singleton-0.15/Makefile.PL]...
[   info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for Apache::Singleton
Writing MYMETA.yml and MYMETA.json
[MSG] Module 'Apache::Singleton' depends on 'Apache::Test', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'ExtUtils::MakeMaker', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'Test::More', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'mod_perl2', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
==> Making package: perl-apache-singleton 0.15-1 (Wed Jun  4 22:32:47 FET 2014)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> perl-apache-test>=1.35
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> perl-apache-test>=0
==> ERROR: Could not resolve all dependencies.

但是
Apache::Test
已经安装了
mod_perl
包。我可以使用
perl-e'use Apache::Test'
验证这一点。我如何告诉
cpanp
跳过此依赖项?

目前,您不能跳过依赖项,只能跳过测试

cpanp i ... --skiptest
安装“easy way”的另一种方法是

cpanm ... --skip-installed

至少您可以下载
.deb
文件(或
.rpm
/
.tgz
,具体取决于您的发行版),然后将其解压缩并将
数据.tgz
(至少在
.deb
文件中)解压缩到
//code>

我使用
cpanp
,因为它允许将Perl模块作为系统包安装。由于该模块相对较小,我可能只需将其复制到我的项目中,至少在代码中将其删除之前;)