Test2::Event::V2(3p) Perl Programmers Reference Guide Test2::Event::V2(3p)
Test2::Event::V2(3p) Perl Programmers Reference Guide Test2::Event::V2(3p) # Test2::Event::V2(3p) Perl Programmers Reference Guide Test2::Event::V2(3p) NNAAMMEE # Test2::Event::V2 - Second generation event. DDEESSCCRRIIPPTTIIOONN # This is the event type that should be used instead of Test2::Event or its legacy subclasses. SSYYNNOOPPSSIISS # UUSSIINNGG AA CCOONNTTEEXXTT # use Test2::API qw/context/; sub my_tool { my $ctx = context(); my $event = $ctx->send_ev2(info => [{tag => 'NOTE', details => "This is a note"}]); $ctx->release; return $event; } UUSSIINNGG TTHHEE CCOONNSSTTRRUUCCTTOORR # use Test2::Event::V2; my $e = Test2::Event::V2->new( trace => {frame => [$PKG, $FILE, $LINE, $SUBNAME]}, info => [{tag => 'NOTE', details => "This is a note"}], ); MMEETTHHOODDSS # This class inherits from Test2::Event. ...