Gaara
Gaara

Reputation: 697

What are the avaialble compilers/interpreters for Perl 5?

Like C where gcc, borland and many more compilers are available, I am wondering whether any other Compiler/Interpreters are available for Perl 5?

From my reading, I understand there was perlcc which compiled the code into B:OP format and then interpreter was used to convert the optree to machine executable.

Upvotes: 2

Views: 201

Answers (1)

user149341
user149341

Reputation:

Ignore perlcc; it is no longer part of Perl, and will only confuse you*.

Perl is an interpreted language. Upon startup, the Perl interpreter parses the source code of a script and executes it immediately. While there is an intermediate representation (the optree), it is purely in memory, and is not reused.

There is only one Perl interpreter. There are no alternate implementations.

(If you're curious: perlcc worked by storing the optree as constant data in an executable which linked against the Perl interpreter. This was a dubious optimization; it didn't actually save much startup time, didn't affect runtime at all, and broke many scripts. It wasn't actually transforming the Perl script to C.)

Upvotes: 7

Related Questions