sub mytool { my $ctx = context(); $ctx->ok(...); $ctx->diag(...); $ctx->release; # This is where the bail-on-fail is triggered } #### sub mytool { $tb->ok(...); # BailOnFail is triggered here $tb->diag(...); # Lost }