Devel::StackTrace::WithLexicals - Devel::StackTrace + PadWalker


Devel-StackTrace-WithLexicals documentation  | view source Contained in the Devel-StackTrace-WithLexicals distribution.

Index


NAME

Top

Devel::StackTrace::WithLexicals - Devel::StackTrace + PadWalker

SYNOPSIS

Top

    use Devel::StackTrace::WithLexicals;

    my $trace = Devel::StackTrace::WithLexicals->new;
    ${ $trace->frame(1)->lexical('$self') }->oh_god_why();

DESCRIPTION

Top

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.

METHODS

Top

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.

If the no_refs option to Devel::StackTrace is used, then each reference is stringified. This can be useful to avoid leaking memory.

Simple, really.

AUTHOR

Top

Shawn M Moore, sartak@gmail.com

BUGS

Top

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.

COPYRIGHT AND LICENSE

Top


Devel-StackTrace-WithLexicals documentation  | view source Contained in the Devel-StackTrace-WithLexicals distribution.