1.Dd Apr 17, 2010 2.Dt PERL 1 3.Os 4.Sh NAME 5.Nm perl, 6.Nm a2p 7.Nd Practical Extraction and Report Language 8.Sh SYNOPSIS 9.Nm perl 10\&... 11.Nm a2p 12\&... 13.Sh DESCRIPTION 14To support multiple versions, the program named 15.Nm perl 16now just selects the real version of Perl to run, and the program named 17.Nm a2p 18now just selects the real version of the awk-to-perl translator to run, 19depending on various settings. 20The current supported versions are 21.Sy @VERSION_DEFAULT@ 22and 23.Sy @VERSION_ALT@ , 24with the default being 25.Sy @VERSION_DEFAULT@ 26(older alternate versions are provided for backward-compatibility, while newer 27alternate versions are provided before we are ready to make it the default). 28Use 29.Pp 30.Dl % man perl@VERSION_DEFAULT@ 31.Dl % man perl@VERSION_ALT@ 32.Dl % man a2p@VERSION_DEFAULT@ 33.Dl % man a2p@VERSION_ALT@ 34.Pp 35to see the man page for a specific version. 36When the version is unspecified, as in: 37.Pp 38.Dl % man perldoc 39.Pp 40the man page for the (unmodified) default 41version of Perl 42.Sy ( @VERSION_DEFAULT@ ) 43will be shown. 44.Sh CHANGING THE DEFAULT PERL VERSION 45Using 46.Pp 47.Dl % defaults write com.apple.versioner.perl Version @VERSION_ALT@ 48.Pp 49will make version 50.Sy @VERSION_ALT@ 51the user default when running the both the 52.Nm perl 53and 54.Nm a2p 55commands 56.Sy ( versioner 57is the internal name of the version-selection software used). 58.Pp 59To set a system-wide default, replace 60.Ql Li com.apple.versioner.perl 61with 62.Ql Li /Library/Preferences/com.apple.versioner.perl 63(admin privileges will be required). 64.Pp 65The environment variable 66.Ev VERSIONER_PERL_VERSION 67can also be used to set the 68.Nm perl 69and 70.Nm a2p 71version: 72.Pp 73.D1 Li % export VERSIONER_PERL_VERSION=@VERSION_ALT@ Em # Bourne-like shells 74.D1 Li " " Sy or 75.D1 Li % setenv VERSIONER_PERL_VERSION @VERSION_ALT@ Em # C-like shells 76.Dl % perl ... 77.Pp 78This environment variable takes precedence over the setting in any preference file. 79.Sh 64-BIT SUPPORT 80Both versions of perl 81support 64-bit execution (which is the default). 82Like the setting the version of Perl, the 83.Nm perl 84command can select between 32 and 64-bit execution. 85Use: 86.Pp 87.Dl % defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes 88.Pp 89to make 32-bit execution the user default (using 90.Ql Li /Library/Preferences/com.apple.versioner.perl 91will set the system-wide default). 92The environment variable 93.Ev VERSIONER_PERL_PREFER_32_BIT 94can also be used (has precedence over the preference file): 95.Pp 96.D1 Li % export VERSIONER_PERL_PREFER_32_BIT=yes Em # Bourne-like shells 97.D1 Li " " Sy or 98.D1 Li % setenv VERSIONER_PERL_PREFER_32_BIT yes Em # C-like shells 99.Pp 100Again, the preference setting and environmental variable applies to both 101.Nm perl 102and 103.Nm a2p . 104.Sh USING A SPECIFIC VERSION 105Rather than using the 106.Nm perl 107command, one can use a specific version directly. 108For example, running 109.Nm perl@VERSION_ALT@ 110from the command line will run the 111.Sy @VERSION_ALT@ 112version of Perl, independent of what the default version of Perl is. 113.Pp 114One can use a specific version of Perl on the 115.Em #! 116line of a script, but that may have portability and future compatibility issues. 117.Pp 118Note that the preference files and environment variable that apply to the 119.Nm perl 120command, do 121.Sy not 122apply when running a specific version of Perl. 123In particular, running 124.Nm perl@VERSION_DEFAULT@ 125will always default to 64-bit execution 126(unless one uses the 127.Xr arch 1 128command to specifically select a 32-bit architecture). 129.Sh SEE ALSO 130.Xr perl@VERSION_DEFAULT@ 1 , 131.Xr perl@VERSION_ALT@ 1 , 132.Xr a2p@VERSION_DEFAULT@ 1 , 133.Xr a2p@VERSION_ALT@ 1 , 134.Xr arch 1 135