Created
September 7, 2013 11:44
-
-
Save tadzik/6474908 to your computer and use it in GitHub Desktop.
Rakudo/jvm panda blocker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub indir (Str $where, Callable $what) { | |
my $old = cwd; | |
LEAVE chdir $old; | |
chdir $where; | |
$what() | |
} | |
sub batman { | |
indir 'foo', { | |
fail "NO"; | |
}; | |
} | |
mkdir 'foo' unless 'foo'.IO.d; | |
my $res = batman; | |
rmdir 'foo'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment