Created
August 10, 2016 15:46
-
-
Save exodist/6d28ef1725f66f887fc34303c5fe99e1 to your computer and use it in GitHub Desktop.
Plugin you can preload to hide diagnostics messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Test2::Plugin::NoDiag; | |
use strict; | |
use warnings; | |
use Test2::API qw/test2_stack test2_add_callback_post_load/; | |
test2_add_callback_post_load(sub { | |
test2_stack->top->filter( | |
sub { | |
my ($hub, $event) = @_; | |
return if $event->diagnostics; | |
return $event; | |
}, | |
inherit => 1, | |
); | |
}); | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment