Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere does pp (PAR) unpack add (-a) files?
    primarykey
    data
    text
    <p>This is my attempt to cut through extraneous issues raised <a href="https://stackoverflow.com/questions/1110546/">"Why don’t my system calls work in the Perl program I wrap with pp?"</a> I have created a simple Perl script on a linux system:</p> <pre><code>new-net:~/scripts # cat ls_test.pl @ls_out = `ls -l`; map { print "$_\n" } @ls_out; $out = `sh out_test.sh`; print "$out\n"; </code></pre> <p>This script calls a simple shell file:</p> <pre><code>new-net:~/scripts # cat out_test.sh echo "I'm here" </code></pre> <p>I used pp to pack the Perl script along with the shell script into ls_test:</p> <pre> new-net:~/test # unzip -l ls_test Archive: ls_test Length Date Time Name -------- ---- ---- ---- 0 07-13-09 16:41 script/ 436 07-13-09 16:41 MANIFEST 214 07-13-09 16:41 META.yml 93 07-13-09 16:41 script/ls&#95;test.pl 538 07-13-09 16:41 script/main.pl 16 07-13-09 16:20 out&#95;test.sh -------- ------- 1297 6 files </pre> <p>If I run the packed file in an otherwise empty directory, the shell script is not found:</p> <pre> new-net:~/test # ./ls_test total 3391 -rwxr-xr-x 1 root root 3466177 Jul 13 16:41 ls_test sh: out_test.sh: No such file or directory </pre> <p>If I copy the shell script into the directory, the packed script runs as expected:</p> <pre> new-net:~/test # ./ls_test<br> total 3395 -rwxr-xr-x 1 root root 3466177 Jul 13 16:41 ls_test -rw-r--r-- 1 root root 16 Jul 13 16:20 out_test.sh I'm here </pre> <p>So, where does a <code>pp</code> packed script expect to find an included file? And how should a call to that included file be configured in the original Perl script?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload