Alt-Lexical-Var-ButSupportModernPerl
view release on metacpan or search on metacpan
lib/Lexical/Var.pm view on Meta::CPAN
that logically refers to the same entity, even when the name is spelled
without its usual sigil. For example, any definition of "C<@foo>" affects
element references such as "C<$foo[0]>". Barewords in filehandle context
actually refer to the glob variable. Bareword references to subroutines,
such as "C<foo(123)>", only work on Perl 5.11.2 and later; on earlier
Perls you must use the C<&> sigil, as in "C<&foo(123)>".
Where a scalar name is defined to refer to a constant (read-only) scalar,
references to the constant through the lexical namespace can participate
in compile-time constant folding. This can avoid the need to check
configuration values (such as whether debugging is enabled) at runtime.
A name definition supplied by this module takes effect from the end of the
definition statement up to the end of the immediately enclosing block,
except where it is shadowed within a nested block. This is the same
lexical scoping that the C<my>, C<our>, and C<state> keywords supply.
Definitions from L<Lexical::Var> and from C<my>/C<our>/C<state> can shadow
each other. These lexical definitions propagate into string C<eval>s,
on Perl versions that support it (5.9.3 and later).
This module only manages variables of static duration (the kind of
( run in 1.088 second using v1.01-cache-2.11-cpan-49f99fa48dc )