|
NAMETest2::Tools::Grab - Temporarily intercept all events without adding a scope level. DESCRIPTIONThis package provides a function that returns an object that grabs all events. Once the object is destroyed events will once again be sent to the main hub. SYNOPSIS use Test2::Tools::Grab;
my $grab = grab();
# Generate some events, they are intercepted.
ok(1, "pass");
ok(0, "fail");
my $events_a = $grab->flush;
# Generate some more events, they are intercepted.
ok(1, "pass");
ok(0, "fail");
my $events_b = $grab->finish;
EXPORTS
SEE ALSOTest2::Util::Grabber - The object constructed and returned by this tool. SOURCEThe source code repository for Test2 can be found at https://github.com/Test-More/Test2-Suite/. MAINTAINERSAUTHORSCOPYRIGHTCopyright 2018 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/
|