发新话题
打印

PadWalker - play with other peoples' lexical variables

PadWalker - play with other peoples' lexical variables

PadWalker is a module which allows you to inspect (and even change!) lexical variables in any subroutine which called you. It will only show those variables which are in scope at the point of the call.

The peek_my routine takes one parameter, the number of call levels to go back. (It works the same way as caller() does.) It returns a reference to a hash which associates each variable name with a reference to its value. The variable names include the prefix, so $x is actually '$x'.

http://search.cpan.org/~robin/PadWalker-0.10/PadWalker.pm      
乘天地之正,而御六气之辩,以游无穷

TOP

发新话题