Permalink
Browse files

simplify &indir

  • Loading branch information...
1 parent 2d2c253 commit 2ce433c695f3c475ac62a0f2352bfcf05d3ba496 @moritz moritz committed Jul 3, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/Panda/Common.pm
View
@@ -7,12 +7,10 @@ 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;
- my $fail;
- try { $what() }
- chdir $old;
- $!.throw if $!;
+ $what()
}
sub withp6lib(&what) is export {

0 comments on commit 2ce433c

Please sign in to comment.