From 19de2cf4deccae977035aa8f4cdca8fc6d8fb4fc Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Sat, 11 Aug 2012 15:49:41 +0200 Subject: [PATCH] [operators] let and temp --- lib/operators.pod | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/operators.pod b/lib/operators.pod index e7cb14d82..c7431bb6b 100644 --- a/lib/operators.pod +++ b/lib/operators.pod @@ -481,4 +481,22 @@ details. Creates a I L from its arguments. See L for more details. +=head1 Named Unary Precedence + +=head2 prefix temp + + sub prefix:(Mu $a is rw) + +"temporizes" the variable passed as the argument, which means it is reset +to its old value on scope exit. (This is similar to the +L operator in Perl 5, +except that C does not reset the value). + +=head2 prefix let + + sub prefix:(Mu $a is rw) + +Hypothetical reset: if the current scope is exited either through an exception +or C, the old value is restored. + =end pod