|lexalias( $where, $name, $variable )||
$where refers to the subroutine in which to alias the lexical, it
can be a coderef or a call level such that youd give to caller
$name is the name of the lexical within that subroutine
$variable is a reference to the variable to install at that location
lexalias delves into the internals of the interpreter to perform its actions and is so very sensitive to bad data, which will likely result in flaming death, or a core dump. Consider this a warning.
There is no checking that you are attaching a suitable variable back into the pad as implied by the name of the variable, so it is possible to do the following:
lexalias( $sub, $foo, [qw(an array)] );
The behaviour of this is untested, I imagine badness is very close on the horizon though.
peek_sub from PadWalker, Devel::Peek
Richard Clamp <firstname.lastname@example.org> with close reference to PadWalker by Robin Houston
Copyright (c) 2002, 2013, Richard Clamp. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
|perl v5.20.3||LEXALIAS (3)||2013-01-16|