I was looking for this comment in an indir implementation:
sub indir(Str() $path, $what, :$test = <r w>) { my $newCWD := $*CWD.chdir($path,:$test); $newCWD // $newCWD.throw; { my $*CWD = $newCWD;
I thought this use of my was weird, which led to doc issue 1082 when it was said that my actually lexical. I would think temp would be more suitable for user-level temporary changes for dynamic variables.
But now I see this comment, but I'm not quite sure what that means. Is this temp broken? Is it not available here? Or is the comment simply wrong?
If the comment is correct, it has this way of dealing with dynamic variables that have leaked to the ordinary level of programmers, because this is what some people have to do in the guts (and are they used to it?)
And how low is this level really? It seems that all Perl 6 should be available here.
perl6 dynamic-scope lexical-scope
brian d foy
source share