Re: Should Test2 maintain $! and $@?

[email protected] (Aristotle Pagaltzis) Mon, 18 Jan 2016 09:39:53 +0100
Newsgroups perl.cpan.workers
Message-ID <[email protected]>
* Chad Granum <[email protected]> [2016-01-18 06:55]:
> Which behavior do you want, preserve one, preserve all, preserve what
> is requested in arguments?

I didn’t consider that. I was thinking ->release would take an optional
bool flag and that’s all. But you’re right that this would not be enough
and that providing enough interface to cover all the cases makes it too
complicated to be worth it.

>     my $err = $@;
>     $ctx->release();
>     $@ = $err;

Heh, which implies an obvious and amusing improvement:

    { local $@; $ctx->release }

Which is *easier* than any special interface, too. So, scrap that.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>