opensource has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to learn and understand the perl source code. I can't seem to figure out how perl compiler and interpreter are implemented. Can anybody advise me on how to study the perl source code. Thanks.

Replies are listed 'Best First'.
Re: Perl Source Code
by Abstraction (Friar) on Sep 24, 2002 at 03:42 UTC
    perlhack (perldoc perlhack) and perlguts (perldoc perlguts) are a good place to start.

Re: Perl Source Code
by Zaxo (Archbishop) on Sep 24, 2002 at 04:39 UTC

    Also perlapi and perlintern. C analyzers are not very useful because of all the macros, but simple token seekers like grep or (better, imo) id-utils are helpful in tracking down definitions. The token parser toke.c is one useful starting point.

    After Compline,
    Zaxo

Re: Perl Source Code
by sauoq (Abbot) on Sep 24, 2002 at 08:05 UTC

    It may be helpful to look at Perl's roots. Pre-5.0 versions are available at http://www.etla.org/retroperl/. The language was quite a bit different way back when but it was smaller too, so you might find earlier versions easier to understand. Don't expect them to compile as easily as Perl does today though.

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Perl Source Code
by Abigail-II (Bishop) on Sep 24, 2002 at 07:02 UTC
    What you need the most is time. And lots of it. There aren't many people that understand all of the source of Perl - perhaps there's even noone. It's not a light task, and you need both knowledge of Perl and C.

    Abigail

Re: Perl Source Code
by opensource (Initiate) on Sep 24, 2002 at 15:18 UTC
    Thank you for your advise. I will give it a try and see if I can figure out something. You all are really very helping.