Richard
Richard

Reputation: 3100

Why doesn't Perl compile to binary files like python

It strikes me as a Good Thing (ie. in terms of compilation time), that the Python interpreter will create bytecode .pyc files. I believe python uses some sort of hash to determine if the source has changed and then recompile.

Would this be a good idea for Perl? ( with respect to the larger projects with many dependencies etc ).

Upvotes: 10

Views: 2073

Answers (4)

Parrot is a bytecode VM which should have been used by next version of Perl, i.e. Perl6, but apparently no more (thanks to Barney Schmale's comment)

Upvotes: 2

ikegami
ikegami

Reputation: 385917

It took longer for Perl to load from binary than from source.

Upvotes: 0

imaximchuk
imaximchuk

Reputation: 748

Actually, there is a way to compile Perl to bytecode, but it has some limitations. See B::Bytecode.

Upvotes: 4

bvr
bvr

Reputation: 9697

For quite long explanation of .pmc files, there is lenghty article on perlmonks, also explaning why nobody uses it.

Upvotes: 12

Related Questions