FAQ

On 18 January 2016 at 19:08, Kent Fredric 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.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 25 of 28 | next ›
Discussion Overview
groupcpan-workers @
categoriesperl
postedJan 12, '16 at 12:53a
activeJan 18, '16 at 10:52p
posts28
users8
websitecpan.org

People

Translate

site design / logo © 2018 Grokbase