.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PAR::Environment 3" .TH PAR::Environment 3 2024-03-04 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PAR::Environment \- Index and reference of PAR environment variables .SH DESCRIPTION .IX Header "DESCRIPTION" PAR uses various environment variables both during the building process of executables or PAR archives and the \fIuse\fR of them. Since the wealth of combinations and settings might confuse one or the other (like me), this document is intended to document all environment variables which PAR uses. .PP Wherever I want to refer to the \f(CW$ENV{FOO}\fR environment hash entry, I will usually talk about the \f(CW\*(C`FOO\*(C'\fR variable for brevity. .SH "INDEX OF ENVIRONMENT VARIABLES" .IX Header "INDEX OF ENVIRONMENT VARIABLES" \&\fBPlease note that this is still very, very incomplete! Contributions welcome!\fR .PP For each variable, there should be a description what it contains, when it can be expected to exist (and contain meaningful information), when it is sensible to define it yourself, and what effect this has. .PP Of course, the description may use examples. .SS PAR_0 .IX Subsection "PAR_0" If the running program is run from within a PAR archive or pp-produced executable, this variable contains the name of the extracted program (i.e. .pl file). This is useful of you want to open the source code file of the running program. .PP For example, if you package a file \fIfoo.pl\fR into \&\fIbar.par\fR and run \fIfoo.pl\fR with this command .PP .Vb 1 \& par.pl foo.par bar.pl .Ve .PP then the \f(CW\*(C`PAR_0\*(C'\fR variable will contain something like \&\f(CW\*(C`/tmp/par\-youser/cache\-b175f53eb731da9594e0dde337d66013ddf25a44/495829f0.pl\*(C'\fR where \f(CW\*(C`youser\*(C'\fR is your username and \&\f(CW\*(C`/tmp/par\-youser/cache\-b175f53eb731da9594e0dde337d66013ddf25a44/\*(C'\fR is the PAR cache directory (\f(CW\*(C`PAR_TEMP\*(C'\fR). .PP The name of the PAR cache directory can take a number of different forms, so use \f(CW\*(C`PAR_0\*(C'\fR if you want to find the extracted program's .pl file \-\- attempting to construct the name yourself requires complex logic that has already produced the value in \f(CW\*(C`PAR_0\*(C'\fR. .PP This works the same for executable binaries (\fI.exe\fR, ...). .PP If you are looking for the name and path of the pp-ed binary file, please refer to the \f(CW\*(C`PAR_PROGNAME\*(C'\fR variable. .SS PAR_CLEAN .IX Subsection "PAR_CLEAN" Users should set \f(CW\*(C`PAR_GLOBAL_CLEAN\*(C'\fR instead. .PP Recreated from \f(CW\*(C`PAR_GLOBAL_CLEAN\*(C'\fR and the value of \f(CW\*(C`\-C\*(C'\fR from the YAML file by the PAR loader, and used within loader to control the initial behavior of extraction, and the final behavior of cleanup. The user can reference \&\f(CW\*(C`PAR_CLEAN\*(C'\fR in the application to determine which of these behaviors is being used for this run of the application. .SS PAR_DEBUG .IX Subsection "PAR_DEBUG" Users should set \f(CW\*(C`PAR_GLOBAL_DEBUG\*(C'\fR instead. .PP If this variable is set to a true value and \fIpar.pl\fR is run, verbose output is sent to STDOUT or the logging filehandle. This is overridden by the \f(CW\*(C`\-q\*(C'\fR option to \fIpar.pl\fR, for steps after argument parsing occurs. .PP This currently only influences \fIpar.pl\fR. Whether this is the intended behaviour remains to be verified. .SS PAR_GLOBAL_CLEAN .IX Subsection "PAR_GLOBAL_CLEAN" Setting \f(CW\*(C`PAR_GLOBAL_CLEAN\*(C'\fR alters the behavior of par applications which see that environment variable at launch. \&\f(CW\*(C`PAR_GLOBAL_CLEAN\*(C'\fR overrides the \f(CW\*(C`\-C\*(C'\fR option. Settings of 0 and 1 are supported. 0 corresponds to not using \f(CW\*(C`\-C\*(C'\fR on the pp command line; 1 corresponds to using \f(CW\*(C`\-C\*(C'\fR on the pp command line. \&\f(CW\*(C`PAR_GLOBAL_CLEAN\*(C'\fR is ignored if \f(CW\*(C`PAR_GLOBAL_TEMP\*(C'\fR is set, yet it controls the form of \f(CW\*(C`PAR_TEMP\*(C'\fR when \f(CW\*(C`PAR_GLOBAL_TEMP\*(C'\fR is not set. .SS PAR_GLOBAL_DEBUG .IX Subsection "PAR_GLOBAL_DEBUG" The PAR loader becomes more verbose when \f(CW\*(C`PAR_DEBUG\*(C'\fR is set. Setting \f(CW\*(C`PAR_GLOBAL_DEBUG\*(C'\fR guarantees that \f(CW\*(C`PAR_DEBUG\*(C'\fR will be set internally, initially. See \f(CW\*(C`PAR_DEBUG\*(C'\fR for more details. .SS PAR_GLOBAL_TEMP .IX Subsection "PAR_GLOBAL_TEMP" Contributes to the calculation of \f(CW\*(C`PAR_TEMP\*(C'\fR, and is further explained there. .SS PAR_GLOBAL_TMPDIR .IX Subsection "PAR_GLOBAL_TMPDIR" Contributes to the calculation of \f(CW\*(C`PAR_TEMP\*(C'\fR, and is further explained there. .SS PAR_INITIALIZED .IX Subsection "PAR_INITIALIZED" This environment variable is for internal use by the PAR binary loader only. Documented only to avoid surprises if spawned applications expect to see a value initialized by the user. .SS PAR_PROGNAME .IX Subsection "PAR_PROGNAME" \&\f(CW\*(C`PAR_PROGNAME\*(C'\fR is set to the fully-qualified path name of the executable program. On Windows, this is reliably obtained from the \f(CW\*(C`GetModuleFileName\*(C'\fR API. On other OSes, if the C runtime is given a qualified path name, it is used, or the unqualified file name given is qualified by walking the path. This is reasonably reliable given normal program spawning conventions, but cannot be guaranteed to be correct in all circumstances. .SS PAR_APP_REUSE .IX Subsection "PAR_APP_REUSE" Strictly internal. Skip this section if you're not a PAR developer. .PP The variable shouldn't ever be exposed to user code and packaged applications should not depend on it being set or not. .PP If an application has been packaged with the \f(CW\*(C`\-\-reusable\*(C'\fR option, the bootstrapping code will set this environment variable to the name of the program that is to be run instead of the packaged program. The \fImain.pl\fR loader script fetches the file name, deletes the environment variable, and then runs the given program. .SS PAR_RUN .IX Subsection "PAR_RUN" This environment variable was set during constructions of \f(CW\*(C`PAR::Packer\*(C'\fR objects (usually during \fIpp\fR runs only) by versions of PAR up to 0.957. Since PAR 0.958, this variable is unused. .SS PAR_SPAWNED .IX Subsection "PAR_SPAWNED" This variable is used internally by the \fIparl\fR binary loader to signal the child process that it's the child. .PP You should not rely on this variable outside of the PAR binary loader code. For a slightly more detailed discussion, please refer to the \&\fIwho_am_i.txt\fR documentation file in the PAR source distribution which was contributed by Alan Stewart. .PP Documented only to avoid surprises if spawned applications expect to see a value initialized by the user. .SS PAR_TEMP .IX Subsection "PAR_TEMP" Users should set \f(CW\*(C`PAR_GLOBAL_TEMP\*(C'\fR instead. \&\f(CW\*(C`PAR_TEMP\*(C'\fR is calculated from a variety of other variables. See the \f(CW\*(C`NOTES\*(C'\fR section in the pod for PAR.pm for a complete description of how the calculation proceeds. \&\f(CW\*(C`PAR_TEMP\*(C'\fR, once calculated, is used as the location where PAR stores its extracted, temporary file cache. .SS PAR_TMPDIR .IX Subsection "PAR_TMPDIR" Contributes to the calculation of \f(CW\*(C`PAR_TEMP\*(C'\fR, and is further explained there. Users should set \f(CW\*(C`PAR_GLOBAL_TMPDIR\*(C'\fR instead. .SS PAR_VERBATIM .IX Subsection "PAR_VERBATIM" The \f(CW\*(C`PAR_VERBATIM\*(C'\fR variable controls the way Perl code is packaged into a PAR archive or binary executable. If it is set to a true value during the packaging process, modules (and scripts) are \&\fBnot\fR passed through the default \f(CW\*(C`PAR::Filter::PodStrip\*(C'\fR filter which removes all POD documentation from the code. Note that the \&\f(CW\*(C`PAR::Filter::PatchContent\*(C'\fR filter is still applied. .PP The \f(CW\*(C`\-F\*(C'\fR option to the \fIpp\fR tool overrides the \f(CW\*(C`PAR_VERBATIM\*(C'\fR setting. That means if you set \f(CW\*(C`PAR_VERBATIM=1\*(C'\fR but specify \&\f(CW\*(C`\-F PodStrip\*(C'\fR on the \f(CW\*(C`pp\*(C'\fR command line, the \f(CW\*(C`PodStrip\*(C'\fR filter will be applied. .PP \&\f(CW\*(C`PAR_VERBATIM\*(C'\fR is not used by the PAR application. .SS PAR_VERBOSE .IX Subsection "PAR_VERBOSE" Setting this environment variable to a positive integer has the same effect as using the \f(CW\*(C`\-verbose\*(C'\fR switch to \fIpp\fR. .SS PP_OPTS .IX Subsection "PP_OPTS" During a \fIpp\fR run, the contents of the \f(CW\*(C`PP_OPTS\*(C'\fR variable are treated as if they were part of the command line. In newer versions of PAR, you can also write options to a file and execute \fIpp\fR as follows to read the options from the file: .PP .Vb 1 \& pp @FILENAME .Ve .PP That can, of course, be combined with other command line arguments to \fIpp\fR or the \f(CW\*(C`PP_OPTS\*(C'\fR variable. .SS "TMP, TEMP, TMPDIR, TEMPDIR" .IX Subsection "TMP, TEMP, TMPDIR, TEMPDIR" Please refer to \f(CW\*(C`PAR_TMPDIR\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" PAR, PAR::Tutorial, PAR::FAQ .PP par.pl, parl, pp .PP PAR::Dist for details on PAR distributions. .SH AUTHORS .IX Header "AUTHORS" Steffen Mueller .PP You can write to the mailing list at , or send an empty mail to to participate in the discussion. Archives of the mailing list are available at or . .PP Please submit bug reports to . If you need support, however, joining the mailing list is preferred. .SH COPYRIGHT .IX Header "COPYRIGHT" PAR: Copyright 2003\-2010 by Audrey Tang, . .PP This document: Copyright 2006\-2010 by Steffen Mueller, .PP Some information has been taken from Alan Stewart's extra documentation in the \&\fIcontrib/\fR folder of the PAR distribution. .PP This program or documentation is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See \fILICENSE\fR.