Skip to content

Commit 5079aff

Browse files
demerphqleonerd
authored andcommitted
Reapply "docs: clarify effect of $^H, %^H, ${^WARNING_BITS}"
This reverts commit d0b5de5 which itself reverted ee428a2 See http://nntp.perl.org/group/perl.perl5.porters/257128
1 parent f6387cf commit 5079aff

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pod/perlvar.pod

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,10 @@ It has the same scoping as the C<$^H> and C<%^H> variables. The exact
18721872
values are considered internal to the L<warnings> pragma and may change
18731873
between versions of Perl.
18741874

1875+
Each time a statement completes being compiled, the current value of
1876+
C<${^WARNING_BITS}> is stored with that statement, and can later be
1877+
retrieved via C<(caller($level))[9]>.
1878+
18751879
This variable was added in Perl v5.6.0.
18761880

18771881
=item $OS_ERROR
@@ -2138,6 +2142,10 @@ This variable contains compile-time hints for the Perl interpreter. At the
21382142
end of compilation of a BLOCK the value of this variable is restored to the
21392143
value when the interpreter started to compile the BLOCK.
21402144

2145+
Each time a statement completes being compiled, the current value of
2146+
C<$^H> is stored with that statement, and can later be retrieved via
2147+
C<(caller($level))[8]>.
2148+
21412149
When perl begins to parse any block construct that provides a lexical scope
21422150
(e.g., eval body, required file, subroutine body, loop body, or conditional
21432151
block), the existing value of C<$^H> is saved, but its value is left unchanged.
@@ -2186,6 +2194,10 @@ L<perlpragma>. All the entries are stringified when accessed at
21862194
runtime, so only simple values can be accommodated. This means no
21872195
pointers to objects, for example.
21882196

2197+
Each time a statement completes being compiled, the current value of
2198+
C<%^H> is stored with that statement, and can later be retrieved via
2199+
C<(caller($level))[10]>.
2200+
21892201
When putting items into C<%^H>, in order to avoid conflicting with other
21902202
users of the hash there is a convention regarding which keys to use.
21912203
A module should use only keys that begin with the module's name (the

0 commit comments

Comments
 (0)