Should I choose ActivePerl or Strawberry Perl for Windows? [duplicate]
Asked Answered
B

10

123

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 Perl comes with additional development tools to compile CPAN modules if necessary. It sounds pretty good to me.

It also says that ActivePerl has a lot of prepackaged modules which are easier to install with PPM. It 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?


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 Perl 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!

Bubble answered 29/7, 2010 at 17:53 Comment(2)
AFAICT, strawberry comes with perldoc so with offline documentation for everything.Rosamariarosamond
Update in 2021: PPM has been removed from ActivePerl 5.28, and will no longer build many packages for previous versions of ActivePerl. So, everybody who opted for ActivePerl because of the nice package manager will have to look for other good reasons. Today ActivePerl needs to be installed with CLI State Tool which looks cumbersome. And you need to pay(!) $96/year to get access to older versions of Perl.Karlsbad
O
37

After having used both for years, I'd say, for me at least, ActivePerl is a much more convenient choice. The PPM installer included in ActivePerl allows you to add alternative PPM repositories which will give you access to almost all useful Perl modules available on CPAN - but prepared and tested for Windows. This was for me, in the long run, a much better (and more robust) choice. Even for the Windows version of the Apache HTTP server, there is a precompiled mod_perl (2.0.4) ppm available which will (did for me) work out of the box with ActivePerl 5.12.1 and Apache 2.2.15.

I think I dropped Strawberry Perl after trying to install DBI + DBD::mysql on Windows 7 (which is a no brainer in ActivePerl; just click on the ppms and choose install).

But maybe that's solved by now. And maybe one can choose the directory where Strawberry Perl gets installed (I couldn't).

BTW: for compiling your own Inline or XS stuff, just install the MinGW compiler by ppm (I didn't do that, but it looks interesting).

Addendum: after reading the comment below, I checked Strawberry Perl again and it's now possible to change the installation directory, which is a denoted feature of the 5.12.0 release (which is the actual version). This would solve one important (IMHO) disadvantage of Strawberry Perl (compared to ActivePerl).

Ornelas answered 29/7, 2010 at 22:26 Comment(4)
ppm is also available for Strawberry and DBD::mysql is included into Strawberry install. Also you can install Strawberry 5.12.x into any directory.Auston
Yes, Strawberry install directory can be anywhere, except if it contains spaces spaces or non-ASCII characters.Petrosal
At some point in the last year, ActivePerl made many of the conveniently available PPMs available through the package manager only if you purchase the Business or Enterprise editions. For those of us who need a free solution, it may be worth revisiting Strawberry.Coprolalia
@Coprolalia - thanks for the info. I dropped AP already since Perl 5.16 and didn't look back. It matured significantly during the last years.Ornelas
S
52

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.

Stoops answered 29/7, 2010 at 18:3 Comment(0)
S
44

Amplifying just a tiny bit on Vivin Paliath's helpful answer:

ActivePerl / PPM pros: If there's a PPM for your version, it's going to work, and simply.

ActivePerl / PPM cons: There's not always a PPM, or at least not always an up-to-date one.

Strawberry Perl / CPAN pros: Your repository is CPAN, not a bunch of binaries maintained by third parties. You have new modules the moment the author releases them, and you're using the build system that the author intended.

Strawberry Perl / CPAN cons: Not everything is guaranteed to build perfectly with the Windows tools.

Strawberry Perl / CPAN mitigating factor: The Strawberry developers try really, really hard to make sure that everything goes smoothly and that as much of CPAN as possible is available to you, and when modules are identified as trouble spots (difficult to build on Windows, but required for other popular modules/applications), they'll either work with the author to get the module fixed so that everyone can install it, or in exceptional cases, apply their own fixups and bundle the module with Strawberry Perl or Strawberry Perl Professional.

My preference is with Strawberry Perl. I appreciate what ActivePerl is trying to do, but I think it's a bottleneck in the development process. They were necessary before the community got together and built Strawberry Perl to bring Windows into the "first world" of the Perl ecosystem, but they're not necessary anymore.

Swam answered 29/7, 2010 at 22:22 Comment(0)
O
37

After having used both for years, I'd say, for me at least, ActivePerl is a much more convenient choice. The PPM installer included in ActivePerl allows you to add alternative PPM repositories which will give you access to almost all useful Perl modules available on CPAN - but prepared and tested for Windows. This was for me, in the long run, a much better (and more robust) choice. Even for the Windows version of the Apache HTTP server, there is a precompiled mod_perl (2.0.4) ppm available which will (did for me) work out of the box with ActivePerl 5.12.1 and Apache 2.2.15.

I think I dropped Strawberry Perl after trying to install DBI + DBD::mysql on Windows 7 (which is a no brainer in ActivePerl; just click on the ppms and choose install).

But maybe that's solved by now. And maybe one can choose the directory where Strawberry Perl gets installed (I couldn't).

BTW: for compiling your own Inline or XS stuff, just install the MinGW compiler by ppm (I didn't do that, but it looks interesting).

Addendum: after reading the comment below, I checked Strawberry Perl again and it's now possible to change the installation directory, which is a denoted feature of the 5.12.0 release (which is the actual version). This would solve one important (IMHO) disadvantage of Strawberry Perl (compared to ActivePerl).

Ornelas answered 29/7, 2010 at 22:26 Comment(4)
ppm is also available for Strawberry and DBD::mysql is included into Strawberry install. Also you can install Strawberry 5.12.x into any directory.Auston
Yes, Strawberry install directory can be anywhere, except if it contains spaces spaces or non-ASCII characters.Petrosal
At some point in the last year, ActivePerl made many of the conveniently available PPMs available through the package manager only if you purchase the Business or Enterprise editions. For those of us who need a free solution, it may be worth revisiting Strawberry.Coprolalia
@Coprolalia - thanks for the info. I dropped AP already since Perl 5.16 and didn't look back. It matured significantly during the last years.Ornelas
I
21

Strawberry Perl is more Unixy in its approach, and I have been always very happy when I've worked with it.

ActivePerl, however, due to its custom package management system, has been a colossal pain when I've worked with it. This matters when you're in an enterprise environment.

For just messing around, IMO, Strawberry Perl is better. /subjective

Ignominy answered 29/7, 2010 at 18:13 Comment(0)
B
16

Both are great and work the same. Strawberry Perl is known for being able to build XS modules, but you can do that with ActivePerl too if you just install the Visual Studio SDK (or the free Express version).

For that matter, if you have access to Visual Studio, the best you can do is to build Perl from source (it's pretty easy if you read the README) and keep building your modules with the same compiler. That's actually a better idea than having a mixture of compiler/modules.

One thing you have to consider if using ActiveState: If you install it on a server facing the Internet, then you are required to buy a Business license ($1000/year/server as noted by Ron Warshawsky). It doesn't mean it won't work; it's only a matter of being a requirement in the EULA. Many people don't know this and have it installed on Internet-facing servers without buying the corresponding license.

Bowleg answered 19/4, 2013 at 14:30 Comment(1)
+1 for warning that ActiveState is not free (contrary to popular belief).Lightship
J
4

If you 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 Perl (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.

Jacquesjacquet answered 29/7, 2010 at 18:3 Comment(0)
B
4

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 development tools via PPM first) if you need it.

Betty answered 21/8, 2010 at 11:0 Comment(1)
Unfortunately, Interix (SUA) is deprecated in Windows8: brianreiter.org/2011/09/15/sua-deprecated-in-windows-8Stumer
K
4

ActivePerl excludes tons of modules from Community edition and building them under Windows is a real pain.

Also, they would let you download and use only latest editions for free. Everything else, like access to 5.8.8 or to earlier version of modules is either Business ($1000/year/server) or Enterprise edition (per quote).

Kinnon answered 3/4, 2013 at 3:4 Comment(0)
F
3

If Larry Wall uses Strawberry Perl so should you. ;)

Furze answered 5/2, 2015 at 18:43 Comment(0)
B
2

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 DLL files. 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.

Bridgework answered 14/8, 2014 at 16:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.