简体   繁体   English

CPAN中是否可以再使用version.pm?

[英]Is version.pm available in CPAN any longer?

I am trying to find the Perl Module version.pm to fix the error below I am receiving while trying to install module CPAN-Meta-Requirements-2.133 . 我正在尝试查找Perl模块version.pm以修复尝试安装模块CPAN-Meta-Requirements-2.133时收到的以下错误。 But I don't see version.pm , the only one I see is Version.PM which is obviously not the one Perl is looking for. 但是我没有看到version.pm ,我看到的唯一一个是Version.PM ,这显然不是Perl所寻找的那个。 Can anyone point to where I can get this version or how I can fix this dependency if version.pm is no longer available? 谁能指出我可以在哪里获得此版本,或者如果version.pm不再可用,该如何解决此依赖性?

Perl Version: v5.16.3 Perl版本: v5.16.3

OS: GNU/Linux x86_64 x86_64 x86_64 作业系统: GNU / Linux x86_64 x86_64 x86_64

Error: 错误:

Can't locate version.pm in @INC (@INC contains:    # Line breaks added
   /root/CPAN-Meta-Requirements-2.133/blib/lib     # for readability
   /root/CPAN-Meta-Requirements-2.133/blib/arch
   /usr/local/lib64/perl5
   /usr/local/share/perl5
   /usr/lib64/perl5/vendor_perl
   /usr/share/perl5/vendor_perl
   /usr/lib64/perl5
   /usr/share/perl5
   .) at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
BEGIN failed--compilation aborted at /root/CPAN-Meta-Requirements-2.133/blib/lib/CPAN/Meta/Requirements.pm line 48.
Compilation failed in require at t/accepts.t line 4.
BEGIN failed--compilation aborted at t/accepts.t line 4.
t/accepts.t ............ Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run

version has come with Perl since Perl 5.10, so it's weird that you would have to install it. 自Perl 5.10起,Perl附带了该版本 ,因此您必须安装它很奇怪。

$ corelist version
version was first released with perl v5.9.0

But version is also available on CPAN in its own distribution in order to allow people to upgrade version without upgrading Perl. 但是版本也可以在CPAN上以自己的发行 版本提供,以便允许人们升级版本而无需升级Perl。

So you may indeed install it as any other module. 因此,您确实可以将其安装为其他任何模块。

cpan version

OK, so first: your link is to CPAN/Version.pm . 好的,所以首先:您的链接是CPAN/Version.pm This is very different than version.pm . 这与version.pm完全不同。 Directory names and the path relative to Perl's include directory are very important to Perl, and putting a .pm file in the wrong location relative to the include path can break Perl pretty badly. 目录名称和相对于Perl包含目录的路径对Perl非常重要,并且将.pm文件放置在相对于包含路径的错误位置可能会严重破坏Perl。

Second: because of that, never install Perl modules manually . 第二:因此, 切勿手动安装Perl模块 Use cpanm instead: 使用cpanm代替:

curl -L https://cpanmin.us | perl - --sudo App::cpanminus # Omit --sudo if your perl isn't installed as root
cpanm version

Third: the version.pm that you want is this one: https://metacpan.org/pod/distribution/version/lib/version.pod , in the JPEACOCK/version-0.9912 distribution. 第三:您想要的version.pm是以下version.pmhttps ://metacpan.org/pod/distribution/version/lib/version.pod,位于JPEACOCK / version-0.9912发行版中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM