DomX has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, here monk Dominik, asking my siblings for wisdom.
I'm a fan of using pp to make standalone programs since v5.40.0, because it lets me use the new Perls and doesn't mess the target system by installing anything by sudo cpan somewhere nobody is finding things again or making updates at all.
Long story short: Delivering a pp archive is already pretty neat, but I'd like to go a step further. The application extracts itself to /tmp/par-<user name hash>/cache-<app hash or -T string> (or similar) by default. So, what I thought, to reduce the startup time, which is really poor for pp executables, compared to native Perl, I'd like to omit the extraction and verification step of the pp binary, but directly start the interpreter from the /tmp/par-.../cache-... directory, with the script as argument. Something I think the pp binary is doing. But the executables and libraries have very obscure names, so I don't know, what exact I need to execute to start up the interpreter from /tmp/par-.../cache-...
Maybe I'm completely wrong on this path anyway and this is any magic within the pp binary itself, not just from this folder.
So, what I actually try to achieve is: having a unpacked Perl interpreter, running my scripts, for example:
$ cat /usr/bin/myapp #!/usr/bin/env bash /usr/libexec/myapp/perl /usr/libexec/myapp/myapp.pl "$@"
I know, I could just compile a Perl residing entirely withing /usr/libexec/myapp, but maybe there is a more simple way to do so?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pp's tmp folder content execution
by bliako (Abbot) on Feb 20, 2026 at 10:35 UTC |