++ed by:
XAERXESS ZURBORG OVID KRAUTCAT ETHER

94 PAUSE users
66 non-PAUSE users.

Chad Granum
and 1 contributors

NAME

Test::Builder::Trace::Frame - Module to represent a stack frame

DESCRIPTION

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 .

CLASS METHODS

$frame = $class->new($depth, $package, $file, $line, $sub)

Create a new instance.

    my $frame = $class->new(4, caller(4));

UTILITY METHODS

@call = $frame->call
($pkg, $file, $line, $subname) = $frame->call

Returns a list similar to calling caller().

ACCESSORS

$depth = $frame->depth

Depth of the frame in the stack

$package = $frame->package

Package of the frame

$file = $frame->file

File of the frame

$line = $frame->line

Line of the frame

$subname = $frame->subname

Name of sub being called

$attrs = $frame->provider_tool

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.

CALCULATED BOOLEAN ATTRIBUTES

The state of these booleans will be determined the first time they are called. They will be cached for future calls.

$todo = $frame->todo

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.

$bool = $frame->nest

True if the frame is a call to Test::Builder::Trace::nest().

$bool = $frame->builder

True if the frame is inside Test::Builder code.

$bool = $frame->transition

True if the frame is a transition between Test::Builder and Non-Test::Builder code.

$bool = $frame->anointed

True if the frame is a call from an annointed test package.

BOOLEAN ATTRIBUTES

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.

$bool = $frame->level

True if the frame is associated with $Test::Builder::Level.

$bool = $frame->report

True if the frame has been chosen as the reporting frame.

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

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