Permalink
Browse files

Merge pull request #56 from donaldh/indir-temp-cwd

Use temp CWD instead of chdir. Avoids LexoticException.
  • Loading branch information...
2 parents 4547e96 + 2c85b0f commit 2259200f9a6148ac91c0d3be56a3c5b11683b907 @tadzik committed Sep 13, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/Panda/Common.pm
View
@@ -6,10 +6,8 @@ sub dirname ($mod as Str) is export {
}
sub indir (Str $where, Callable $what) is export {
- my $old = cwd;
- LEAVE chdir $old;
mkpath $where;
- chdir $where;
+ temp $*CWD = IO::Spec.rel2abs($where);
$what()
}

0 comments on commit 2259200

Please sign in to comment.