http://www.perlmonks.org?node_id=11150203


in reply to Re^6: I prefer not to run the latest version of Perl because:
in thread I prefer not to run the latest version of Perl because:

Thanks for the suggestion, but pp_simple does not exist on my machine. The "pp" utility exists as "C:\Strawberry\perl\site\bin\pp.bat", but there is no pp_simple. I am running Strawberry Perl 5.24.1 on Windows 10. Is pp_simple part of Strawberry Perl, and if so where is it located?

"It's not how hard you work, it's how much you get done."

Replies are listed 'Best First'.
Re^8: I prefer not to run the latest version of Perl because:
by marto (Cardinal) on Feb 07, 2023 at 07:27 UTC
      I had previously followed the pp_simple link. It took me to a page of code from Anonymous Monk which does not run because "wxpar" was not found, and seemed to have nothing to do with pp_simple. I had also previously looked at App::PP::Autolink in CPAN. The examples showed using "pp_simple program-name", but said nothing about what pp_simple is or where/how to get it.

      Thanks again for the suggestions, but unfortunately this has become as frustrating and tedious as trying to get "pp" to produce a working executable in the first place. Right now, life is too short to keep going down rabbit trails, especially when I installed perl2exe, ran it, and got the working executable I was after. It just works.

      The monetary price of "pp", et al is certainly right ($0.00), but the price in terms of time spent trying to get it to work and the accompanying frustration is just too high right now. The price I invested in purchasing perl2exe is worth every cent.

      As an aside, I created a Perl program that simply printed "Hello, world!" and ran it through both pp and perl2exe. The pp executable was 6 MB and the perl2exe executable was 2 MB. I realize disk space is cheap these days, but extrapolated out for many programs much larger than 1 print statement, the space savings become significant. Yet one more reason to prefer perl2exe.

      "It's not how hard you work, it's how much you get done."

        What did you try with pp_autolink? Installation is via the standard process using tools like cpan or cpanm. The pp_autolink script will be installed in one of the bin dirs on your path. For a strawberry perl installed under C:\Strawberry it will be under C:\Strawberry\perl\site\bin. It can also be found using where pp_autolink at the cmd prompt.

        In regards to the file sizes, extrapolation from a single data point is prone to a high degree of uncertainty.

        A better test would be to pack three or more executables, each with increasing complexity and dependencies. I suspect you will the difference is fixed at 4MB, as opposed to a three to one ratio.

        There is also the -z flag with pp to increase the compression level. The default is 6, and setting it to 9 will maximise the compression level and produce smaller files (see https://metacpan.org/pod/pp#-z,-compress=NUMBER). It makes almost no difference with a simple print 'hello' script, but will help with more complex set ups.