Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Perl for Windows ?

by jflevi (Beadle)
on Mar 01, 2008 at 02:59 UTC ( #671323=perlquestion: print w/replies, xml ) Need Help??
jflevi has asked for the wisdom of the Perl Monks concerning the following question:

Good evening, good Monks,

I've been trying to learn Perl on a Linux box.

However my job (corporate pilot) keeps me away quite a bit. I have a fairly new Thinkpad laptop that goes where I go; here is the question:

-- Should I install my favorite flavor of Linux (Ubuntu) with dual boot on the laptop - I need to keep XP for flight planning software, or

-- go the "lazy" route and get a "Perl for windoze" port; I've never used one.

.

Life is tough, it's tougher when you are dumb...

jfl

Replies are listed 'Best First'.
Re: Perl for Windows ?
by GrandFather (Sage) on Mar 01, 2008 at 03:49 UTC

    Actually there is another option: run *nix in a virtual machine under XP. There is a nice LAMP appliance using Xubuntu as a VMware appliance that is trivial to install and get going, although lacking things like 'make' out of the box is a bit of a surprise!

    Take a look at Grandmas lamp if you want to try this option. Take a look at http://blandname.com/2008/02/21/the-10-best-vmware-virtual-appliances for a few other options.


    Perl is environmentally friendly - it saves trees
Re: Perl for Windows ?
by Narveson (Chaplain) on Mar 01, 2008 at 03:33 UTC

    Get a Perl for Windows port.

    I have ActiveState prescribed for me at my job. I am told that Strawberry Perl is nicer.

    Either way, you can be programming Perl on your laptop before the sun comes up tomorrow.

      To clarify some differences:

      • ActiveState Perl's default approach to installing modules is via PPM -- binary packages. Strawberry Perl's default approach is direct from CPAN. PPM has some advantages (no need to install external libraries to get some modules working) and disadvantages (some modules on CPAN may not be available in PPM form).

      • Strawberry Perl includes a compiler and dmake. ActiveState Perl does not, though it will pretty much auto-detect and configure itself appropriately if you install either the MinGW compiler or the MS Visual C++ compiler.

      Generally, I would say that Strawberry Perl is closer to a unix experience, with all the benefits and disadvantages of that.

      Personally, I use Strawberry Perl, do my editing with Vim for Windows, and have installed many of the Windows ports of unix command line tools (e.g. ls, cp, mv, grep) -- though I removed all the gzip, tar, etc. ones as they may not work quite right and some Perl tools may try to use them if they are in the PATH. I find this easier and faster than firing up a virtual machine every time I want to play with Perl.

      Update: I want to add that ActiveState Perl, does support installing from CPAN, if configured correctly, though XS modules obviously won't work without a compiler.

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: Perl for Windows ?
by gam3 (Curate) on Mar 01, 2008 at 03:50 UTC
    My god my life is dependent on windows when I fly. Maybe I'll take the train next time.

    But to answer your question it would depend on what you are using perl for. If you are going to keep using windows then I would use a windows version. If you want to get real work done then I would use a linux or bsd version.

    The main problem with windows is that you have to worry about all its quirks that you would not have in a unix system (including the Mac).

    -- gam3
    A picture is worth a thousand words, but takes 200K.
Re: Perl for Windows ?
by Marza (Vicar) on Mar 01, 2008 at 04:54 UTC

    Nothing wrong with the windows version. I have both activestate and strawberry and have had fun with them.

    Eventually; I will go the vmware route. That is if the company every gives me a computer that can handle it....
Re: Perl for Windows ?
by Herkum (Parson) on Mar 01, 2008 at 06:43 UTC

    Answer this question, do you use/need lots of CPAN modules? if the answer is yes lean towards a *NIX solution.

    Activestate Perl is alright, but its lack of maintenance of PPM packages and no make (nmake is NOT a good replacement) basically cripples your ability to use CPAN which, to me, is the biggest benefit of Perl. You can get by without most of the CPAN stuff but it certainly is not the same.

      do you use/need lots of CPAN modules? if the answer is yes lean towards a *NIX solution

      Had you asked "do you use/need lots of *NIX modules?", I would have agreed with the answer you gave ... but you didn't, and I don't.

      Recent versions of 'nmake' are fine, and there's also the excellent and actively maintained 'dmake' freely available from CPAN. ActivePerl works fine with both 'dmake' and 'nmake', and with both the MinGW (port of gcc) and Microsoft compilers. Then, of course, there's Strawberry Perl which includes both 'dmake' and the MinGW compiler with it. In short, CPAN is now very accessible to Win32 builds of perl.

      Cheers,
      Rob

        Thirded. I use AS builds, MSC v6 and nmake v7. I install most modules manually. Downloading the .gz; use gunzip and tar from UnxUtils; then the four part mantra.

        Some modules that have particularly complex dependancies on third party modules, GD for example, I have built myself, but it is simply easier to use a PPM if it is available.

        The main problem I encounter when building XS modules is unresolvable externals, usually from Perl%x.dll. The source of this problem is that win32 allows the programmer to specify which entrypoints in .dll are exported. This is used on win32 builds to ensure that only those entrypoints that are part of the official PerlApi are exported.

        Under *nix using gcc et al. either a) has no way to limit what is exported from an .so; b) there is a mechanism but it isn't used. Either way, the result is that programmers writing XS modules under *nix, frequently use functions from perl58x.so that aren't officially a part of the PerlApi and don't notice because they get resolved and work. But when someone comes to try and build those modules on win32, those unofficial apis won't resolve. The originating authors without access to/interest in win32 simply put the problem down to "windoze" and that's where it ends.

        If one #define was changed to allow all the functions in perl5x.dll to be exported, another huge swath of failures would disappear.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        Perl has lots of modules that have nothing to do with *NIX. To use those modules you need make. Let me give you an example. Consider the Template module.

        The PPM for Template is listed as 1.11(from Activestate), the current version on CPAN is 2.19. I was using version 2.15 recently and came across a bug in which it does not like to using DateTime modules in the template itself( example: can be found here). The answer was to use the XS version of Template The XS version requires make(refer to Corion's post for clarity), nmake did not work. I tried to find a compiled version, and in the Template tarball the INSTALL file refers to a web site that is about 4 years out of date. I got lucky, the bug was fixed in the non-XS version of Template in 2.19, but these sorts of situations can be common.

        More than a few times I have had to go back and forth between CPAN and PPM trying to get a combination of modules from either or to get the functionality that I want. It is not fun.

        I fully second your opinion!

        I run ActiveState Perl + MinGW + a recent nmake.exe and I have installed on my laptop a local CPAN-mirror which is updated daily, so even when in the air or under water I can still install almost any module I like.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      Activestate Perl is alright, but its lack of maintenance of PPM packages and ...
      I use Ubuntu on my own computer, Red Hat on company servers, Windows/ActiveState and Windows/Cygwin on company desktops.

      I must say ActiveState has become very nice the last couple of years. No matter what OS you choose, the relationship between CPAN and OS distros is an issue at some point, more for those that habitually tries very many different packages all the time. Usually that is not a problem google can't help. Sometimes it is. Not a big issue. Note that there is suplementary repositories for most distros, including ActiveState.

      That off course, does not mean that I shouldn't soon try out Strawberry, I will...

      Edit: Almost forgot: If Ubuntu is OP's favourite, I would try to find out if Wine was a viable option, or if running windows and flightplanner in VmWare is. If not, I'd go for dual boot.

Re: Perl for Windows ?
by downer (Monk) on Mar 01, 2008 at 16:18 UTC
    depending on how deep you want to get, cygwin may be sufficient. At the very least, installing cygwin is easier and less fraught with peril then setting up a dual boot. If you find at any point that this isnt meeting your needs, you can go with dual boot. I always like to do things the easy way!
      I agree wholeheartedly! Besides Perl, Cygwin will also give you the option of installing gcc, bash, vim, emacs, locate, wget, and tons of other useful GNU utilities.

      Also, under Cygwin, all your local files are directly accessible, so C:\Temp\foo.txt is directly accessible as /cygdrive/c/Temp/foo.txt. That's handy.

        Thanks for all suggestions !!! This is really a terrific community.

        I finally went for dual boot ... I didn't want to have to learn a new way of doing Perl; I have already enough to learn !

        Installing Ubuntu v7.10 on my WinXP machine was a breeze; less than an hour ... and yes Ubuntu can read NTFS; write is still iffy.

        Thanks again to all who took the time to share !!!

        Life is tough, it's tougher when you are dumb...

        jfl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://671323]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2019-03-21 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How do you Carpe diem?





    Results (108 votes). Check out past polls.

    Notices?