Test::Stream::DebugInfo - Debug information for events
See Test::Stream::Manual::ToTest2 for a conversion guide.
All events need to have access to information about where they were created, as well as if they are todo, or part of a skipped test. This object represents that information.
use Test::Stream::DebugInfo; my $dbg = Test::Stream::DebugInfo->new( frame => [$package, $file, $line, $subname], );
- $reason = $dbg->todo
Get/Set/Unset todo for the current debug-info.
- $reason = $dbg->skip
Get/Set/Unset skip for the current debug-info.
- $msg = $dbg->detail
Used to get/set a custom trace message that will be used INSTEAD of
at <FILE> line <LINE>when calling
Typically returns the string
at <FILE> line <LINE>. If
detailis set then its value wil be returned instead.
This issues a warning at the frame (filename and line number where errors should be reported).
This throws an exception at the frame (filename and line number where errors should be reported).
- $frame = $dbg->frame()
Get the call frame arrayref.
- ($package, $file, $line, $subname) = $dbg->call()
Get the caller details for the debug-info. This is where errors should be reported.
- $pkg = $dbg->package
Get the debug-info package.
- $file = $dbg->file
Get the debug-info filename.
- $line = $dbg->line
Get the debug-info line number.
- $subname = $dbg->subname
Get the debug-info subroutine name.
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.
Copyright 2015 Chad Granum <firstname.lastname@example.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.