Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ).

like image 942
Richard Avatar asked Dec 22 '11 08:12

Richard


3 Answers

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

like image 117
bvr Avatar answered Oct 17 '22 09:10

bvr


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

like image 4
imaximchuk Avatar answered Oct 17 '22 09:10

imaximchuk


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)

like image 2
Basile Starynkevitch Avatar answered Oct 17 '22 11:10

Basile Starynkevitch