perl
view release on metacpan or search on metacpan
ext/Pod-Html/corpus/perlvar-copy.pod view on Meta::CPAN
=item ${^RE_TRIE_MAXBUF}
Controls how certain regex optimisations are applied and how much memory they
utilize. This value by default is 65536 which corresponds to a 512kB temporary
cache. Set this to a higher value to trade memory for speed when matching
large alternations. Set it to a lower value if you want the optimisations to
be as conservative of memory as possible but still occur, and set it to a
negative value to prevent the optimisation and conserve the most memory.
Under normal situations this variable should be of no interest to you.
=item $SYSTEM_FD_MAX
=item $^F
X<$^F> X<$SYSTEM_FD_MAX>
The maximum system file descriptor, ordinarily 2. System file
descriptors are passed to exec()ed processes, while higher file
descriptors are not. Also, during an open(), system file descriptors are
preserved even if the open() fails. (Ordinary file descriptors are
closed before the open() is attempted.) The close-on-exec
status of a file descriptor will be decided according to the value of
C<$^F> when the corresponding file, pipe, or socket was opened, not the
time of the exec().
=item $^H
WARNING: This variable is strictly for internal use only. Its availability,
behavior, and contents are subject to change without notice.
This variable contains compile-time hints for the Perl interpreter. At the
end of compilation of a BLOCK the value of this variable is restored to the
value when the interpreter started to compile the BLOCK.
When perl begins to parse any block construct that provides a lexical scope
(e.g., eval body, required file, subroutine body, loop body, or conditional
block), the existing value of $^H is saved, but its value is left unchanged.
When the compilation of the block is completed, it regains the saved value.
Between the points where its value is saved and restored, code that
executes within BEGIN blocks is free to change the value of $^H.
This behavior provides the semantic of lexical scoping, and is used in,
for instance, the C<use strict> pragma.
The contents should be an integer; different bits of it are used for
different pragmatic flags. Here's an example:
sub add_100 { $^H |= 0x100 }
sub foo {
BEGIN { add_100() }
bar->baz($boon);
}
Consider what happens during execution of the BEGIN block. At this point
the BEGIN block has already been compiled, but the body of foo() is still
being compiled. The new value of $^H will therefore be visible only while
the body of foo() is being compiled.
Substitution of the above BEGIN block with:
BEGIN { require strict; strict->import('vars') }
demonstrates how C<use strict 'vars'> is implemented. Here's a conditional
version of the same lexical pragma:
BEGIN { require strict; strict->import('vars') if $condition }
=item %^H
The %^H hash provides the same scoping semantic as $^H. This makes it
useful for implementation of lexically scoped pragmas. See L<perlpragma>.
=item $INPLACE_EDIT
=item $^I
X<$^I> X<$INPLACE_EDIT>
The current value of the inplace-edit extension. Use C<undef> to disable
inplace editing. (Mnemonic: value of B<-i> switch.)
=item $^M
X<$^M>
By default, running out of memory is an untrappable, fatal error.
However, if suitably built, Perl can use the contents of C<$^M>
as an emergency memory pool after die()ing. Suppose that your Perl
were compiled with C<-DPERL_EMERGENCY_SBRK> and used Perl's malloc.
Then
$^M = 'a' x (1 << 16);
would allocate a 64K buffer for use in an emergency. See the
F<INSTALL> file in the Perl distribution for information on how to
add custom C compilation flags when compiling perl. To discourage casual
use of this advanced feature, there is no L<English|English> long name for
this variable.
=item $OSNAME
=item $^O
X<$^O> X<$OSNAME>
The name of the operating system under which this copy of Perl was
built, as determined during the configuration process. The value
is identical to C<$Config{'osname'}>. See also L<Config> and the
B<-V> command-line switch documented in L<perlrun>.
In Windows platforms, $^O is not very helpful: since it is always
C<MSWin32>, it doesn't tell the difference between
95/98/ME/NT/2000/XP/CE/.NET. Use Win32::GetOSName() or
Win32::GetOSVersion() (see L<Win32> and L<perlport>) to distinguish
between the variants.
=item ${^OPEN}
An internal variable used by PerlIO. A string in two parts, separated
by a C<\0> byte, the first part describes the input layers, the second
part describes the output layers.
=item $PERLDB
=item $^P
X<$^P> X<$PERLDB>
The internal variable for debugging support. The meanings of the
various bits are subject to change, but currently indicate:
( run in 0.751 second using v1.01-cache-2.11-cpan-97f6503c9c8 )