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

This is probably a pretty stupid question, but I have seen perl "Compilers" mentioned all over the place, but have been unable to find one. I understand that perl in an interpreted (as opposed to compiled) language, but it would still be very useful to be able to compile into a binary (or bytecode). If anyone knows where I can pick up a compiler it would help alot! Thanx!

Replies are listed 'Best First'.
Re: Perl Compiler
by zodiac (Beadle) on May 10, 2000 at 17:57 UTC
    people talk about perl compiling things, because perl is a compiling interpreter, which means it compiles your skript at runtime. (except for evals, and the like, ...)
    there is also a CPAN module that can be used as a backend to create C or bytecode.
    Note:perlfaq3 says the following about it:
      In general, the compiler will do nothing to make a Perl program smaller, faster, more portable, or more secure. In fact, it will usually hurt all of those.
Re: Perl Compiler
by snowcrash (Friar) on May 10, 2000 at 17:48 UTC
Re: Perl Compiler
by Anonymous Monk on May 10, 2000 at 19:45 UTC
    On win32, download p2exe: http://www.dynamicstate.com/perl2exe.htm
      Gaaah! Not perl2exe. That is NOT a compiler, unless you mean compiler in the sense of "aggregator". It does nothing to turn Perl into precompiled bytecodes; it merely bundles your program together with ALL of the perl distribution so that you create a one-click installer.

      I cringe whenever I see that now. It is marketed in such a misleading way.

RE: Perl Compiler
by perlcgi (Hermit) on Jun 01, 2000 at 14:39 UTC
    Actually your perl is compiled everytime you run a perl program. Your code goes through 4 phases as /usr/bin/perl chews on it. To learn more about Perl and compiling check out Chapter 18 of the new Camel book. It's not published 'till July or so, but you can read the beta chapter here.