The canonical way of responding to scope at the Perl level (without $^H chicanery) is to return an object that you let fall out of scope at the appropriate time.
So, for example, you'd use something like:
sub TEST_WHICH_HAS_LOG_OUTPUT { my $dummy = $log->capture_log_only_for_this_scope; is(...); }
Have you considered doing something along those lines?
In reply to Re: "local" side effects
by Somni
in thread "local" side effects
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |