Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Cygwin vs. Active State Perl Install

by yburge (Acolyte)
on Apr 24, 2006 at 21:29 UTC ( #545396=perlquestion: print w/replies, xml ) Need Help??
yburge has asked for the wisdom of the Perl Monks concerning the following question:

We are trying to convert our DOS batch scripts to Perl, and I'd like some advice on the method on installing it better to use the download available from Active State, or cygwin? I've noticed that a lot of the documentation (and the printed manuals I've been given) seem to expect that Perl has been installed from the Active State website. A programmer on our team (who is not going to be working with the scripts on a regular basis) really pushes the cygwin version. It seems to me, even though I'm NOT a programmer, that Active State provides more "stuff" than the cygwin site does. What do you Perl experts think?

Replies are listed 'Best First'.
Re: Cygwin vs. Active State Perl Install
by Asim (Hermit) on Apr 24, 2006 at 21:55 UTC

    This is a tough one, because I understand why your programmer is pushing cygwin. It compiles many Perl modules that need a C-compiler, for one. That can make a difference in any number of things, including how easy it is to upgrade and fix bugs in older versions of modules.

    However, I tend to lean towards recommending ActiveState's version of Perl for Windows. If he's the only expert on cygwin, and especially if he's the only guy who's savvy on Unix and Unix-like Operating Systems, the act of compiling modules will be up to him. ActiveState's PPM bypasses much of the "Makefile + 3 makes" stuff, making it more useable for the person beginning in Perl. Mind you, the cpan shell(s) that are "native" to Perl are almost as easy and reliable as PPM, but when they break, they tend to break hard.

    Also, ActiveState puts a lot of work into developing Windows-specific modules. Although you can use 'em with cygwin's Perl, they are usually already there with ActiveState, and well-supported by them. I've developed rather involved and complex Windows login scripts with these ActiveState modules, and found them to work well.

    All in all, I'd vote for the ease of ActiveState's implementation over the edge in compatibility that cygwin gives you, especially if you're working mostly on Windows systems. I totally understand your programmer's good intentions, yet think he might consider who'll have to support this, in the long run.

    Does that help? If you tell us more about what the DOS programs are doing, we might be able to give more detailed commentary.

    ----Asim, known to some as Woodrow.

      Most of our batches read and/or update Oracle data warehouse tables (this is an insurance company), and produce reports for the accountants, policy producers, executives, etc.. For example, one batch produces a list of clients to whom lapse notices need to be sent; another produces billing statements.

        Ah, OK. I've never worked w/Oracle via Perl, however it's one of the strongly-supported DBs, usually via the DBD::Oracle module and it's "descendants". A quick check with my local Activestate install (w/the latest version) vs. the CPAN Search Site shows the ActiveState PPM versions of Oracle modules are up-to-date, so you should be great there!

        If I might offer two pieces of advice? Once you feel solid with basic Perl, I'd recommend starting with Programming the Perl DBI -- I wish I still had my copy! After that, and if you're looking to build a really strong toolset, Perl has developed some powerful tools for making code-based database queries really simple. I'd recommend learning a tool like Class::DBI or DBIx::Class; it's heavy at the beginning for a beginner, but you'll eventually be able to write very simple code in a "robust" fashion to do your queries.

        I hope that helps you guys out! Good luck!

        ----Asim, known to some as Woodrow.

        We use Oracle here and I am one a very few perlers at my company; but I used Active State and very successfully, so much so that I convinced my Sysadmin to install the oracle DBD and DBI on our sun box.

        Cygwin on the other hand is much more difficult to get working, and I never did manage to get the DBI on it.
Re: Cygwin vs. Active State Perl Install (fork in the road)
by tye (Sage) on Apr 24, 2006 at 22:04 UTC

    There are quite a few binary distributions of Perl for Win32 available besides the two you mention. The primary advantage of cygwin Perl is that you get a working fork (not a badly emulated, slow, buggy, imitation fork). The primary disadvantage is that you need to install cygwin, which probably means the install is approximately an order of magnitude less simple.

    For replacing *.bat files, you don't need to a real fork. So I'd go with a smaller distribution than cygwin in your case (though I do recommend installing cygwin in the general case -- though I don't use cygwin Perl much personally for no particular reason, though, I suspect it prefers cygwin path treatment which would be a pain at times). I'd probably not go with ActiveState, personally, if for no other reason than I like to support competition and having a near monopoly even for Win32 Perl distributions is something I prefer not to contribute to. (: gives a good list but it isn't always complete, unfortunately, but it gives you some other choices in case you are interested.

    - tye        

Re: Cygwin vs. Active State Perl Install
by swampyankee (Parson) on Apr 24, 2006 at 22:00 UTC

    My first thought would be to install ActiveState's Perl. If nothing else, it's a single step to install it, instead of getting Cygwin's setup executable, then installing its version of Perl. I also suspect that the ActiveState port has a better selection of default modules for dealing the Windows than does the Cygwin port.


    "Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. "
    —G. Steele
Re: Cygwin vs. Active State Perl Install
by VSarkiss (Monsignor) on Apr 24, 2006 at 22:09 UTC
Re: Cygwin vs. Active State Perl Install
by inman (Curate) on Apr 25, 2006 at 07:44 UTC
    My vote is for the ActiveState distribution. The main reason is that PPM means that you tend not to need a compiler to install many of the common modules. Obviously there are some modules that require a C compiler but they tend to be less mainstream and some of the repository maintainers take requests so they can do it for you if you ask nicely!

    The one thing that I would point out is that the PPM builds on ActiveState are built automatically and need to pass all of the tests before they are released. I have noticed that some of the modules are at quite old versions compared to CPAN. For example - Activestate has a much older version of WWW-Mechanize than the University of Winnepeg.

      Please forgive my ignorance, but I have (at least) one question about do I know if any of our modules actually need a C compiler? And is "modules" the correct term? We have about 3 dozen batch scripts, and I know that there are some "default" modules which come with various Perl downloads, but I haven't yet grasped the concept of Perl modules yet (I'm OBVIOUSLY new to Perl, and I'm trying to learn it at the same time I'm converting our batch scripts).

        A module is a code library. Modules are generally written to provide a solution to some common task, although they are often written internally as a way of managing large projects.

        Pure Perl modules are generally simple to install and use regardless of the Perl installation you are using.

        XS modules include code written in C and need an appropriate compiler for part of the install process. They can be much harder to install because they need to be built on the target system during the install process. ActiveState avoids the XS build issue by providing a tool (ppm) that downloads precompiled modules and installs them. Cygwin provides a *nix environment and, with an appropriate compiler, can build and install XS modules from CPAN using the usual *nix tools.

        I suspect that for your task you found ActiveState to be the way to go and probably didn't need to install very many additional modules in any case.

        DWIM is Perl's answer to Gödel

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://545396]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-09-25 23:48 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (291 votes). Check out past polls.