in reply to "local" side effects
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: "local" side effects
by chromatic (Archbishop) on May 21, 2004 at 18:18 UTC | |
|
Re: Re: "local" side effects
by Ovid (Cardinal) on May 21, 2004 at 19:04 UTC |