Test2::EventFacet::Trace - Debug information for events
The Test2::API::Context object, as well as all Test2::Event types need to have access to information about where they were created. This object represents that information.
use Test2::EventFacet::Trace; my $trace = Test2::EventFacet::Trace->new( frame => [$package, $file, $line, $subname], );
Used as a custom trace message that will be used INSTEAD of at <FILE> line <LINE> when calling $trace->debug.
at <FILE> line <LINE>
$trace->debug
Get the call frame arrayref.
The process ID in which the event was generated.
The thread ID in which the event was generated.
The ID of the context that was used to create the event.
The ID of the hub that was current when the event was created.
How deeply nested the event is.
True if the event was buffered and not sent to the formatter independent of a parent (This should never be set when nested is 0 or undef).
0
undef
Note: All facet frames are also methods.
Used to get/set a custom trace message that will be used INSTEAD of at <FILE> line <LINE> when calling $trace->debug.
detail() is an alias to the details facet field for backwards compatibility.
detail()
details
Typically returns the string at <FILE> line <LINE>. If detail is set then its value will be returned instead.
detail
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).
Get the caller details for the debug-info. This is where errors should be reported.
Get the debug-info package.
Get the debug-info filename.
Get the debug-info line number.
Get the debug-info subroutine name.
Get a signature string that identifies this trace. This is used to check if multiple events are related. The Trace includes pid, tid, file, line number, and the cid which is 'C\d+' for traces created by a context, or 'T\d+' for traces created by new().
'C\d+'
'T\d+'
new()
The source code repository for Test2 can be found at http://github.com/Test-More/test-more/.
Copyright 2016 Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
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.