Skip to content

Commit 7736027

Browse files
committed
Add perlvar.pod, a (temporary?) place to document magical variables.
1 parent 783d3a8 commit 7736027

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

lib/perlvar.pod

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
=begin pod
2+
3+
=head1 perlvar - list of known magical variables
4+
5+
=head2 Compile-time "constants"
6+
7+
$?FILE Which file am I in?
8+
$?LINE Which line am I at?
9+
&?ROUTINE Which routine am I in?
10+
&?BLOCK Which block am I in?
11+
%?LANG What is the current set of interwoven languages?
12+
13+
Other compile-time constants:
14+
15+
$?KERNEL Which kernel am I compiled for?
16+
$?DISTRO Which OS distribution am I compiling under
17+
$?VM Which virtual machine am I compiling under
18+
$?XVM Which virtual machine am I cross-compiling for
19+
$?PERL Which Perl am I compiled for?
20+
$?SCOPE Which lexical scope am I in?
21+
$?PACKAGE Which package am I in?
22+
$?MODULE Which module am I in?
23+
$?CLASS Which class am I in? (as variable)
24+
$?ROLE Which role am I in? (as variable)
25+
$?GRAMMAR Which grammar am I in?
26+
$?TABSTOP ???
27+
$?USAGE
28+
29+
=head2 Dynamic variables
30+
31+
$*ARGFILES Magic command-line input handle
32+
@*ARGS Arguments from the command line
33+
$*IN Standard input filehandle
34+
$*OUT Standard output filehandle
35+
$*ERR Standard error filehandle
36+
$*TZ
37+
$*FATAL
38+
$*CWD
39+
40+
=end pod

0 commit comments

Comments
 (0)