Test::Builder::Trace::Frame - Module to represent a stack frame
When a test fails it will report the filename and line where the failure occured . In order to do this it needs to look at the stack and figure out where your tests stop, and the tools you are using begin . This object represents a single stack frame .
Create a new instance.
my $frame = $class->new(4, caller(4));
Returns a list similar to calling caller().
caller()
Depth of the frame in the stack
Package of the frame
File of the frame
Line of the frame
Name of sub being called
If the frame is a call to a provider tool this will contain the attribute hashref for that tool. This returns undef when the call was not to a provider tool.
The state of these booleans will be determined the first time they are called. They will be cached for future calls.
True if the frame comes from a package where $TODO is present.
Caveat Will not find the $TODO if it is undefined UNLESS the $TODO came from Test::More.
True if the frame is a call to Test::Builder::Trace::nest().
True if the frame is inside Test::Builder code.
True if the frame is a transition between Test::Builder and Non-Test::Builder code.
True if the frame is a call from an annointed test package.
Note None of these are set automatically by the constructor or any other calls. These get set by Test::Builder::Trace when it scans the stack. It will never be useful to check these on a frame object you created yourself.
True if the frame is associated with $Test::Builder::Level.
$Test::Builder::Level
True if the frame has been chosen as the reporting frame.
Copyright 2014 by Chad Granum <exodist7@gmail.com>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Test::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Simple
CPAN shell
perl -MCPAN -e shell install Test::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.