Devel::StackTrace::WithLexicals - Devel::StackTrace + PadWalker
use Devel::StackTrace::WithLexicals; my $trace = Devel::StackTrace::WithLexicals->new; ${ $trace->frame(1)->lexical('$self') }->oh_god_why();
Devel::StackTrace is pretty good at generating stack traces.
PadWalker is pretty good at the inspection and modification of your callers' lexical variables.
Devel::StackTrace::WithLexicals is pretty good at generating stack traces with all your callers' lexical variables.
All the same as Devel::StackTrace, except that frames (in class Devel::StackTrace::WithLexicals::Frame) also have a lexicals method. This returns the same hashref as returned by PadWalker.
lexicals
Simple, really.
Shawn M Moore, <sartak@gmail.com>
<sartak@gmail.com>
No known bugs.
I had to copy and paste some code from Devel::StackTrace to achieve this (it's hard to subclass). There may be bugs lingering here.
Please report any bugs through RT: email bug-devel-stacktrace-withlexicals at rt.cpan.org, or browse http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-StackTrace-WithLexicals.
bug-devel-stacktrace-withlexicals at rt.cpan.org
Copyright 2008 Shawn M Moore.
Some portions written by Dave Rolsky, they belong to him.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Devel::StackTrace::WithLexicals, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::StackTrace::WithLexicals
CPAN shell
perl -MCPAN -e shell install Devel::StackTrace::WithLexicals
For more information on module installation, please visit the detailed CPAN module installation guide.