Skip to content

Commit 6cdd9f3

Browse files
committed
change _NAME vars to IO::Path objects
$*PROGRAM_NAME -> $*PROGRAM $*EXECUTABLE_NAME -> $?COMPILER or $*SHEBANG
1 parent beef8e6 commit 6cdd9f3

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

S19-commandline.pod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ DRAFT: Synopsis 19: Command Line Interface
1414

1515
Created: 12 Dec 2008
1616

17-
Last Modified: 26 Oct 2009
18-
Version: 26
17+
Last Modified: 27 Nov 2009
18+
Version: 27
1919

2020
This is a draft document. This document describes the command line interface.
2121
It has changed extensively from previous versions of Perl in order to increase
@@ -67,9 +67,9 @@ containing whitespace must be quoted. The I<program> processes the arguments
6767
and performs the requested actions. It looks something like F</usr/bin/perl6>,
6868
F<parrot perl6.pbc>, or F<rakudo> (or F<mono niecza.exe>, et cetera),
6969
and is followed by zero or more I<arguments>.
70-
Perl 6 does not do any processing of the I<program> portion of the command
71-
line, but it is made available at run-time via the C<< PROCESS::<$PROGRAM_NAME> >>
72-
variable.
70+
The I<program> portion of the command
71+
line is made available at run-time via the C<< PROCESS::<$PROGRAM> >>
72+
variable (normally accessed as C<$*PROGRAM>) as an C<IO::Path>.
7373

7474
Command line I<arguments> are broken down into I<options> and I<values>.
7575
Each option may take zero or more values. After all options have been

S28-special-names.pod

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
Created: 23 Feb 2009, created by Tim Nelson from miscellaneous documents lying around
1616

17-
Last Modified: 11 Jun 2013
18-
Version: 11
17+
Last Modified: 27 Nov 2013
18+
Version: 12
1919

2020
=head1 Special Variables
2121

@@ -89,7 +89,8 @@ be fleshed out in S26.
8989
%*ENV S02 Hash of Str # system environment variables
9090
$*ERR S16 IO::Handle # Standard error handle
9191
$*EUID Int # effective user id
92-
$*EXECUTABLE_NAME Str # executable name
92+
$?COMPILER IO::Path # location of the compiler executable
93+
$*SHEBANG IO::Path # location of the interpreter executable (usually eqv $?COMPILER)
9394
$?FILE S02 Str # current filename of source file
9495
$?GRAMMAR S02 Grammar # current grammar
9596
$*GID Int # group id
@@ -110,7 +111,7 @@ be fleshed out in S26.
110111
$*PERL S02 Application # perl version running under
111112
$*PID Int # system process id
112113
%=pod S02 # (or some such)
113-
$*PROGRAM_NAME S19 Str # name of the Perl program being executed
114+
$*PROGRAM S19 IO::Path # location of the Perl program being executed
114115
%*PROTOCOLS S16 Hash of Method # Stores the methods needed for the uri() function
115116
::?ROLE Str # current role (as package or type name)
116117
$?ROLE S02 Role # current role
@@ -188,7 +189,7 @@ If a column has a "-" in it, it means that item is unavailable in that version o
188189
$( $GID $*GID Real GID (Group ID)
189190
$> $EUID $*EUID Effective UID
190191
$) $EGID $*EGID Effective GID
191-
$0 $PROGRAM_NAME $*PROGRAM_NAME
192+
$0 $PROGRAM_NAME $*PROGRAM (plus stringification)
192193
$^C $COMPILING $*COMPILING
193194
$^D $DEBUGGING $*DEBUGGING
194195
$^F $SYS_FD_MAX $*SYS_FD_MAX ...or some such
@@ -201,7 +202,7 @@ If a column has a "-" in it, it means that item is unavailable in that version o
201202
$^V $] $?PERL.version
202203
$^W $*WARNINGS (if any dynamic control needed)
203204
${^WARNING_BITS} $?WARNINGS
204-
$^X $*EXECUTABLE_NAME ...or some such
205+
$^X $?COMPILER or $*SHEBANG (plus stringification)
205206
ARGV $*ARGFILES Note the P6 idiom for this handle:
206207
for lines() {
207208
# each time through loop

0 commit comments

Comments
 (0)