Parse::StackTrace::Frame - A single frame (containing a single function) from a stack trace.


 my $frame = $thread->frame_number(0);
 my $function = $frame->function;
 my $arguments = $frame->args;
 my $number = $frame->number;
 my $file_name = $frame->file;
 my $file_line = $frame->line;


Represents a single frame in a stack trace. A frame represents a single function call in a stack trace. A frame can also contains other information, like what arguments were passed to the function, or what code file the frame's function is in.

Usually you get a frame by accessing "frames" in Parse::StackTrace::Thread or calling "frame_number" in Parse::StackTrace::Thread, or using one of the other methods in Parse::StackTrace::Thread that returns a frame.


These are methods that take no arguments and just return information.

Only "function" will always have a value. The other attributes are all optional and may return undef if they have not been specified.


The name of the function that was called in this trace. We return it just as its written in the stack trace, so we can't guarantee anything about the format.


A string representing the arguments that were passed to the function.


What number frame this was in the stack trace.


The name of the file that the code of this function lives in. (This will be the source file, not the binary file, for languages that differentiate between those two things.) This may be the full path to the file, or just the file name.


The line number in "file" where this function was called.


The actual code on that line of that file.


True if this is the frame where we crashed. For example, in a GDB trace, is_crash true if this is the frame where the signal handler was called.


You may also want to read the documentation for the specific implementations of Frame for the various types of stack traces that we parse, because they might have more methods that aren't available in the generic Frame: