in reply to Re: Can you change the location PAR packer pp unpacks to at runtime?
in thread Can you change the location PAR packer pp unpacks to at runtime?

PAR::Environment
Users should set PAR_GLOBAL_TEMP instead. PAR_TEMP is calculated from a variety of other variables. See the NOTES section in the pod for PAR.pm for a complete description of how the calculation proceeds. PAR_TEMP, once calculated, is used as the location where PAR stores its extracted, temporary file cache.
http://search.cpan.org/src/SMUELLER/PAR-Packer-0.982/contrib/docs/who_am_i.txt
So far the temp dir has been based on the current value of $ENV{TEMP}. + What if we want the temp dir to be some specific place for our application, re +gardless of system values ? C:\Par>set PAR_GLOBAL_TEMP=c:\Par\temp C:\Par>demo.exe a b c My basename is demo $0 = C:\Par\demo.exe My args are: a b c My @INC is: c:\Par\temp/inc/lib c:\Par\temp/inc CODE(0xdb2718) + . I am a PAR package I am a binary file I am running as '$0 @ARGV' C:\Par\demo.exe a b c My temp dir is c:\Par\temp and it will NOT be deleted after the script finishes A copy of this script was extracted as C:\Par\temp\d2f130a4.pl PAR environment: PAR_0=C:\Par\temp\d2f130a4.pl PAR_ARGC=4 PAR_ARGV_0=demo.exe PAR_ARGV_1=a PAR_ARGV_2=b PAR_ARGV_3=c PAR_GLOBAL_CLEAN=1 PAR_GLOBAL_TEMP=c:\Par\temp PAR_INITIALIZED=2 PAR_PROGNAME=C:\Par\demo.exe PAR_SPAWNED=1 PAR_TEMP=c:\Par\temp C:\Par> PAR_TEMP is set to PAR_GLOBAL_TEMP, but PAR_GLOBAL_CLEAN is overidden. + If you chose a fixed temp dir, you also clean up after yourself. There is cur +rently no way to define a fixed temp dir inside the PAR package, and since te +mp dir creation is done before the script runs, PAR_GLOBAL_TEMP must be set b +efore running the PAR package.
  • Comment on Re^2: Can you change the location PAR packer pp unpacks to at runtime?
  • Download Code