我应该在 Windows 上使用哪个版本的 Perl?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/71513/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which version of Perl should I use on Windows?
提问by szabgab
The win32.perl.orgweb site provides references to several Perl distributions for MS Windows.
该win32.perl.org网站提供参考的几个Perl分发用于MS Windows。
For a long time I have been using ActivePerl from ActiveStatebut recently I switched to Strawberry Perl.
很长一段时间以来,我一直在使用ActiveState 中的ActivePerl, 但最近我切换到 Strawberry Perl。
IMHO The only advantage that Active Perl still has over Strawberry Perl is the fact that it comes with Perl Tk which means its easy to install Devel::ptkdbthe graphical debugger. Other than that, I think Strawberry Perl has all the advantages.
恕我直言,Active Perl 与 Strawberry Perl 相比的唯一优势是它带有 Perl Tk,这意味着它易于安装 Devel::ptkdb图形调试器。除此之外,我认为 Strawberry Perl 具有所有优点。
采纳答案by Ovid
Strawberry Perlis just getting better and better. One problem I've repeatedly had with ActiveState is that my modules sometimes fail to install because I need an upgrade to a core module, but they won't allow that. Thus, everybody who doesn'tuse Windows can use my code, but they can't do that with ActiveState's Perl.
Strawberry Perl正在变得越来越好。我在 ActiveState 中反复遇到的一个问题是,我的模块有时无法安装,因为我需要升级到核心模块,但他们不允许这样做。因此,每个不使用 Windows 的人都可以使用我的代码,但是他们不能使用 ActiveState 的 Perl 来做到这一点。
ActiveState also has a very dodgy build system which often fails to report exactly why a module failed to build. I got so tired of emailing and asking for this information that I eventually gave up. I want my code to run on Windows, but if ActiveState doesn't provide me with that information and doesn't give me any option for upgrading core modules, I just can't use it. Some of my modules have NO build failures on any operating system -- except those with ActiveState Perl. Support Strawberry Perl and just don't worry about ActiveState.
ActiveState 也有一个非常狡猾的构建系统,它经常无法准确报告模块构建失败的原因。我厌倦了通过电子邮件和要求提供这些信息,以至于我最终放弃了。我希望我的代码在 Windows 上运行,但是如果 ActiveState 没有向我提供该信息并且没有给我任何升级核心模块的选项,我就无法使用它。我的一些模块在任何操作系统上都没有构建失败——除了那些使用 ActiveState Perl 的模块。支持 Strawberry Perl 并且不用担心 ActiveState。
If ActiveState has fixed their build system and their 'no upgrade to core modules' policy, it's worth revisiting.
如果 ActiveState 已经修复了他们的构建系统和他们的“不升级到核心模块”的政策,那么值得重新审视。
回答by Darren Meyer
There is no single-best Perl distribution. Vanilla Perl(relocatable, redistributable Perl), and it's more-developer-friendly Strawberry Perlhave significant potential.
没有最好的 Perl 发行版。Vanilla Perl(可重定位、可重新分发的 Perl)和它对开发人员更友好Strawberry Perl具有巨大的潜力。
However, there is a very good reason why ActivePerlis so very popular. The advantages mostly come in the form of ease of deployment for your end users (no compiler necessary to use their package manager, PPM). The ActiveState PDK (Perl Development Kit) is also a very nice way to pack a complete Windows binary that doesn't require any Perl to be installed on the user's machine.
然而,ActivePerl如此受欢迎是有充分理由的。优势主要体现在易于最终用户部署的形式(无需编译器即可使用他们的包管理器 PPM)。ActiveState PDK(Perl 开发工具包)也是打包完整 Windows 二进制文件的一种非常好的方式,不需要在用户的机器上安装任何 Perl。
Unfortunately, many very nice CPAN modules (like the Perl bindings for OpenSSL) are not available via ActiveState's repository.
不幸的是,许多非常好的 CPAN 模块(如 OpenSSL 的 Perl 绑定)无法通过 ActiveState 的存储库获得。
Like most things, you should make your selection based on which distribution best meets your needs.
与大多数事情一样,您应该根据哪种发行版最能满足您的需求来进行选择。
回答by Michael Carman
I primarily use ActivePerl, but I really like where Strawberry Perl is headed. I love that the cpan shell "just works" and I don't have to jump through a bunch of hoops to install XS modules. (e.g. ExtUtils::FakeConfig, though that's less necessary in more recent ActivePerl builds.) I'm also excited about the possibility of Perl on a thumbdrive. The dev release of Portable Perlis pretty usable already.
我主要使用 ActivePerl,但我真的很喜欢 Strawberry Perl 的发展方向。我喜欢 cpan shell“正常工作”,而且我不必跳过一堆箍来安装 XS 模块。(例如 ExtUtils::FakeConfig,尽管在最近的 ActivePerl 版本中这不是必需的。)我也对在拇指驱动器上安装 Perl 的可能性感到兴奋。Portable Perl的开发版已经非常好用了。
I agree that the main advantage of ActivePerl is Tk out of the box, but note that as of 5.10 ActivePerl no longer ships with Tk by default. It ships with Tkx instead.
我同意 ActivePerl 的主要优点是开箱即用的 Tk,但请注意,从 5.10 开始,默认情况下 ActivePerl 不再附带 Tk。它与 Tkx 一起提供。
回答by Penfold
The future is definitely Strawberry Perl. Whichever you chose though (and this problem is not unique to Windows), if you're distributing the end result to other machines, you're going to have to be careful as regards the installer/installation instructions you provide.
未来绝对是草莓 Perl。不管你选择哪一个(这个问题不是 Windows 独有的),如果你将最终结果分发到其他机器,你将不得不小心你提供的安装程序/安装说明。
回答by Rob Kam
Strawberry Perlis more like Perl on *nix. It comes with MinGWwhich could be useful on its own. The Perl modules can also be installed with either ppm or cpan.
Strawberry Perl更像是 *nix 上的 Perl。它带有MinGW,它本身可能很有用。Perl 模块也可以用 ppm 或 cpan 安装。
回答by gWaldo
I by far prefer Strawberry Perl. For one, it installs gcc as part of mingwin, so that you can install directly from CPAN.
到目前为止,我更喜欢 Strawberry Perl。一方面,它将 gcc 作为 mingwin 的一部分安装,以便您可以直接从 CPAN 安装。
I used ActiveState's perl for awhile, but I had a lot of flakiness from one machine to another despite them being (seemingly) identically configured. Their PPM module packaging left a bad taste, also. It makes it dead-simple to manage packages, but you rely on them to update PPM after CPAN updates. Also, PPM is not by any means the full content of the CPAN; The last time I'd used ActivePerl, I had a hard time finding all of the modules I needed, and the ones that were there were often an old version.
我使用 ActiveState 的 perl 有一段时间了,但我从一台机器到另一台机器有很多片状,尽管它们(似乎)配置相同。他们的 PPM 模块包装也留下了不好的味道。它使管理包变得非常简单,但是在 CPAN 更新后,您依靠它们来更新 PPM。此外,PPM 绝不是 CPAN 的全部内容;上次我使用 ActivePerl 时,我很难找到我需要的所有模块,而且那些模块通常是旧版本。
回答by reinierpost
I always use Cygwin (xterms with bash are so much better than cmd windows) and the Perl that comes with it. I install Perl modules with the CPAN shell (the "cpan" command); it works fine.
我总是使用 Cygwin(带有 bash 的 xterms 比 cmd windows 好得多)和它附带的 Perl。我使用 CPAN shell(“cpan”命令)安装 Perl 模块;它工作正常。
回答by phreakre
ActiveState Perl has been considered the de facto Windows Perl for quite a while. While it has a lot of flaws and a lot of us use something else, it remains very popular. If you were building Perl code to be executed on a Windows machine (other than your own), I would consider writing it with an eye towards a default (or as default as I could get it) AS Perl installation executing it. Anything else and you are introducing barriers to entry for others trying to use your app later.
ActiveState Perl 一直被认为是事实上的 Windows Perl。虽然它有很多缺陷,而且我们很多人都在使用其他东西,但它仍然很受欢迎。如果您正在构建要在 Windows 机器上执行的 Perl 代码(而不是您自己的机器),我会考虑在编写它时着眼于默认(或我可以得到的默认值)AS Perl 安装执行它。其他任何事情,您都会为以后尝试使用您的应用程序的其他人设置进入障碍。
回答by AmbroseChapel
回答by aczarnowski
The code I write lands in Fortune 500 companies so a "corporate" feeling is helpful. I've used ActivePerl so far, and it's worked fine for both internal tooling and for distribution to those large'ish customers.
我编写的代码适用于财富 500 强公司,因此“企业”感觉很有帮助。到目前为止,我一直在使用 ActivePerl,它在内部工具和分发给那些大型客户方面都运行良好。