How can I compile my Perl script so to reduce startup time?

后端 未结 6 2029
旧时难觅i
旧时难觅i 2020-12-18 12:04

Is there a way to save a compiled version of my perl scripts?

Or a way to do a JavaScript style compile where you just remove comments, whitespace, etc?

6条回答
  •  时光取名叫无心
    2020-12-18 12:30

    You're trying to optimize in the wrong place. If you are running scripts in a web/cgi environment, there is no need to take a compile hit every time the script is executed. The scripts should be running persistently, which you can do with Apache mod/perl, FastCGI, or a number of newer technologies and frameworks such as Plack and Catalyst. If you are more specific about your needs, you will discover that there are a number of options available to you.

提交回复
热议问题