Skip to content

Commit

Permalink
Changes to special variables as per "$?OS changes" discussion on mail…
Browse files Browse the repository at this point in the history
…ing list. Haven't

worried about compatibility for now, though.  


git-svn-id: http://svn.pugscode.org/pugs@25699 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
wayland committed Mar 5, 2009
1 parent eb41ab0 commit 206af03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions S02-bits.pod
Expand Up @@ -2127,7 +2127,7 @@ Here are some possibilities:

The following return objects that contain all pertinent info:

$?OS Which operating system am I compiled for?
$?KERNEL Which kernel am I compiled for?
$?DISTRO Which OS distribution am I compiling under
$?VM Which virtual machine am I compiling under
$?XVM Which virtual machine am I cross-compiling for
Expand Down Expand Up @@ -2155,7 +2155,7 @@ compile time, so dead code can be eliminated by the optimizer.

Note that some of these things have parallels in the C<*> space at run time:

$*OS Which OS I'm running under
$*KERNEL Which kernel I'm running under
$*DISTRO Which OS distribution I'm running under
$*VM Which VM I'm running under
$*PERL Which Perl I'm running under
Expand Down
10 changes: 6 additions & 4 deletions S28-special-names.pod
Expand Up @@ -67,6 +67,8 @@ be fleshed out in S26.
$! S04 # Current Exception object
$/ S05 Match # Last match
$0, $1, $2 S05 Str # First captured value from match: $/[0]
$?ARCH SoftwarePackage # Host architecture
$?XARCH SoftwarePackage # Target architecture
@*ARGS S06 Array of Str # command-line arguments
$*ARGFILES S02 IO # The magic command-line input handle
&?BLOCK S06 Block # current block (itself)
Expand Down Expand Up @@ -96,8 +98,8 @@ be fleshed out in S26.
$?MODULE S02 Module # current module
%*OPTS S19 Hash of XXX # Options from command line
%*OPT... S19 Hash of XXX # Options from command line to be passed down
$?OS SoftwarePackage # operating system compiled for
$*OS SoftwarePackage # operating system running under
$?KERNEL SoftwarePackage # operating system compiled for
$*KERNEL SoftwarePackage # operating system running under
$*OUT S16 IO # Standard output handle
$?PARSER S02 Grammar # Which Perl grammar was used to parse this statement?
$?PACKAGE S02 Package # current package
Expand All @@ -113,8 +115,8 @@ be fleshed out in S26.
$?SCOPE S02 # Current "my" scope (XXX unnecessary?)
$*UID Int # system user id
$?USAGE S06 Str # Default usage message generated at compile time
$?VM S02 Str # Which virtual machine am I compiling under
$?XVM S02 Str # Which virtual machine am I cross-compiling for
$?VM S02 SoftwarePackage # Which virtual machine am I compiling under
$?XVM S02 SoftwarePackage # Which virtual machine am I cross-compiling for

Note that contextual variables such as C<$*OUT> may have more than
one current definition in the outer dynamic context, in which case
Expand Down

0 comments on commit 206af03

Please sign in to comment.