Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Compiling and Installing Perl

by xenchu (Friar)
on Dec 04, 2003 at 16:55 UTC ( #312248=perlquestion: print w/ replies, xml ) Need Help??
xenchu has asked for the wisdom of the Perl Monks concerning the following question:

If my two question are well documented somewhere, I apologize.

In answer to another question here Abigail II posted the following code.

perl -Dr -ce '/[\S*\W*]/'

But when I attempted to run it on my machine, I got this message:

Recompile Perl with -DDEBUGGING to use -D switch

My first question then is how do I recompile Perl? I am using Activestate Perl v5.6.1 build 630. And as I was searching for material about recompiling it occurred to me that perhaps I should just upgrade to 5.8.1. Will the install of a new version of Perl automatically delete (or upgrade?) the old version? If the install doesn't do this, how do I arrange it?

I have a strong suspicion that both these questions have been answered somewhere. Oh well, it's not the first time I have overlooked the obvious.
Thanks in Advance,
xenchu

Perl has one Great Advantage and one Great Disadvantage:

It is very easy to write a complex and powerful program in three lines of code.

********************************************

The Needs of the World and my Talents run parallel to infinity.

Comment on Compiling and Installing Perl
Select or Download Code
Re: Compiling and Installing Perl
by PodMaster (Abbot) on Dec 04, 2003 at 20:48 UTC
    And as I was searching for material about recompiling it ...
    To recompile perl you must download the source first. It's freely available from CPAN (and ActivePerl's source is available from http://downloads.activestate.com).

    In the source distributions you'll find a number of README files which install platform specific install instructions (like README.win32 for win32 platforms). These get installed as documentation in the from of perl$os (like perlwin32).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Compiling and Installing Perl
by shenme (Priest) on Dec 04, 2003 at 22:57 UTC
    I've upgraded to the latest from ActiveState, 5.8.1 build 807, and that still gives the same response you got "Recompile Perl with -DDEBUGGING to use -D switch".

    There are instructions in the ActiveState installation notes on how to upgrade, though upgrading from 5.6.x to 5.8.x most likely means you will first want to de-install the old AS perl and then install the new.

    Whether you will be able to recompile from source depends on whether your system has a compiler on it.   I've not bothered with an MS compiler for some years now, prefering to make do with AS's offerings.   Another option is installing and building under Cygwin and the like environments which do come with compilers. I've got Cygwin, but again, just haven't needed to rebuild.

    I'd say, unless you have a crying need for a built-from-source Perl feature, such as -D debugging features, don't bother with all that bother.

    Of course, people could volunteer compelling examples of what I've been missing by not building my own ...

Re: Compiling and Installing Perl
by ysth (Canon) on Dec 05, 2003 at 00:54 UTC
    Because, of all the things you can do with the -D switch, debugging REs is the most commonly wanted when not debugging perl itself, you can do:
    $ perl -we'use re "debug"; qr/[\s*\W*]/' Compiling REx `[\s*\W*]' size 13 Got 108 bytes for offset annotations. first at 1 1: ANYOF[\0-/:-@[-\^`{-\377+utf8::IsSpacePerl !utf8::IsWord](13) 13: END(0) stclass `ANYOF[\0-/:-@[-\^`{-\377+utf8::IsSpacePerl !utf8::IsWord]' mi +nlen 1 Offsets: [13] 1[8] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 9[ +0] Freeing REx: `"[\\s*\\W*]"'
    even on a non-debugging perl.
      Except nobody will reccomend you write code like that :)
      perl -Mre=debug -we'qr/[\s*\W*]/'
      perldoc perlrun
        Thanks to everyone for their answers. If I can get the time (and the nerve) I will try installing Perl 5.8.1. In the the meantime I will use the command line code from AnonyMonk and study the code ysth sent.

        Thanks to all,

        xenchu


        ****sigfilesigfilesigfilesigfilesigfilesigfilesigfilesigfile

        Perl has one Great Advantage and one Great Disadvantage:

        It is very easy to write a complex and powerful program in three lines of code.

        ********************************************

        The Needs of the World and my Talents run parallel to infinity.
        In my experience, the -M switch isn't as widely understood as "use" :). I've gotten comments a number of times indicating that peoples eyes glaze over when they see a switch they don't know, even where it should be pretty obvious what it does.

        That said, here's a cool way to check a module's version number: perl -MName::Of::Module=99999999

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-08-31 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls