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

Hello: Can anyone tell me on what language is perl coded on? I think is C but im not sure, I need this for a homework. I tried looking in Google but without success. And does anyone knows in what language is DBI, CGI and XML::Parser coded on? Is it C? cheers!

Replies are listed 'Best First'.
Re: Perl's father language?
by tachyon (Chancellor) on Nov 05, 2004 at 04:05 UTC

    Not quite sure if you want history or not. Perl has done R&D* on many languagues. Initially Bourne Shell, Sed, Awk and of course C. If you type 'history of Perl' into Google you will find lots of links. In fact every link on the first page is useful, although the first one is of course a joke.

    Perls core is written in C. A lot of functionality is added by Modules that exist outside of the core. These modules can be in pure Perl. They can also contain binary components as Perl provides dynamic runtime loading of C, C++ and other binaries via the XS mechanism. DBI has one part in Perl and another in C which are linked by XS. Click the link, follow the link to DBI-1.45 and click Browse. You will see .pm (Perl) .xs (XS/C) and .h (C header) files. CGI is pure Perl. XML::Parser is like DBI with Perl and XS components however the guts of the functionality lives in James Clark's expat library, so it is really just Perl compatibility wrapper on top of this library.

    *R&D Perl style involves Ripoff & Duplicate, Re-engineer & Dismember, Repair & Displace in roughly that order ;-)

    cheers

    tachyon

Re: Perl's father language?
by gaal (Parson) on Nov 05, 2004 at 05:18 UTC