On 18 January 2016 at 19:08, Kent Fredric <kentfred...@gmail.com> wrote: > You could possibly make it a parameter to ->release > > ->release({ no_restore => 1 }) # don't restore anything > ->release({ no_restore => [qw( $@ )] }) # only avoid restoring $@
Aaaactually it might make more sense on `context()` my $ctx = context(); # default, preserves all my $ctx = context({ preserve => undef }); # preserve nothing my $ctx = context({ preserve => [] }); # preserve nothing my $ctx = context({ preserve => [qw( $@ )] }); # preserve $@ $ctx->release(); # restores preserved values Though which is more effective would depend on how its implemented and how those vars are stored/preserved. I'll have to dig into the code later maybe. -- Kent KENTNL - https://metacpan.org/author/KENTNL