Should I choose ActivePerl or Strawberry Perl for

2019-03-07 19:21发布

This question already has an answer here:

I'm totally new to Perl but I'd like to try it out. I read about two rival distributions available for Windows platform (I guess there's just Perl on other OSes :).

Wikipedia says that Strawberry comes with additional dev tools to compile CPAN modules if necessary. Sounds pretty good to me.

It also says that ActivePerl has a lot of prepackaged modules which are easier to install with PPM. Sounds great too!

There's a clear trade-off between those two. And I wonder what should I pick to get started? If I pick one how hard is it to migrate to the other?

Edit: I gave both distributions a run for a couple of weeks. I actually liked both which is a good thing! One can't go wrong with either of these. I ended up going with ActivePerl simply because it comes with offline documentation(in HTML) - a great life-savior for those who are on the road or just not always connected. It was super-easy for me to get started with Perl language while I was on vacation when I wasn't always online.

Strawberry is at least as great if not greater. So I can totally recommend it, too. And I have to say one should just learn Perl - it's a very beautiful language. Give it a try!

10条回答
做个烂人
2楼-- · 2019-03-07 19:47

Strawberry Perl uses CPAN, which means that you are up to date as far as modules are concerned. When things are added to CPAN, you have immediate access to them. Strawberry Perl also comes with MinGW which means that Strawberry Perl can use quite a few XS modules directly from CPAN without any modification. The MinGW distribution comes with gcc, make, ld and other tools to help you build modules. I think Strawberry Perl also comes with a few modules that let you install PPMs (Perl Package Manager files).

ActivePerl installs modules using its own format called PPM (Perl Package Manager). The official repository is hosted by ActiveState. You can find PPMs for most of the popular modules so you shouldn't have any trouble unless you are looking for an obscure or really new package (so bleeding-edge stuff won't work because PPM usually lags behind CPAN). Although easier to install than CPAN modules, PPMs are specifically created for Windows and so some CPAN modules will not work (because they do Unix-specific things).

I have used both before and it seemed to work for most cases. But I lean towards Strawberry Perl because the environment is closer to Unix and so there are not many incompatibilities. On the other hand, ActivePerl is made for Windows and so it works with Windows very well.

Another option is to install Cygwin and Perl that comes with Cygwin. I have done that before and it works reasonably well. You also get access to CPAN.

Pick what you think works best for you.

查看更多
戒情不戒烟
3楼-- · 2019-03-07 19:47

If your design your application right, it shouldn't matter which you choose.

A big point might be the versions of various modules that each can provide, or not provide. PPM packages can lag behind CPAN releases, but if you aren't careful, bleeding edge CPAN releases can break backwards compatibility. Furthermore, sometimes there will be PPM packages for things that just won't build properly under Strawberry (though this implies that the module is poorly designed more often than not).

Just be aware of the versions of any modules you use, and you should be fine, regardless of which you choose.

查看更多
何必那么认真
4楼-- · 2019-03-07 19:50

If you are using the box.com client to sync files, then you probably want (at least at the moment) to go with Strawberry Perl. The ppm executable conflicts with one of the Box.com DLLs. The gui will not start at all (yielding a Windows message that the "perl ... interpreter has stopped working".) I have also had intermittent problems using the command line version of ppm when the Box.com client is installed.

查看更多
乱世女痞
5楼-- · 2019-03-07 19:52

In a perfect world, I'd choose debian-interix or pkgsrc-interix perl (not the ancient Perl that ships with Interix/SFU/SUA) since it provides the most POSIX / UNIX -like system (including real copy-on-write fork, not windows fork emulation from Cygwin). I have in the past (and it is installed on Windows machines here), but not everyone can / will install SFU/SUA just for Perl. In those cases I'd recommend ActivePerl, primarily for the interface's familiarity to Windows users (PPM graphical shell versus CPAN) and its integration with the Perl Dev Kit (PerlExe, PerlNET, PerlSvc, and friends). Also, contrary to what others have answered, you can use CPAN (and the CPAN shell) with ActivePerl (though it does involve installing the necessary dev tools via PPM first) if you need it.

查看更多
登录 后发表回答