Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Pass absolute paths to custom Builders #68

wants to merge 2 commits into from

3 participants


Fixes problem where we chdir before calling the builder, and then pass it the path relative to the old (pre-chdir) working directory


Good catch, but I think I'd rather change $where where it comes from, as it's passed not only to build(), but also to test() install() and all the others. I think it's sane that all of them just get an absolute $where in the first place.


@raydiak I would suggest that you also pass it around as an IO::Path object instead of a string, so nobody needs to call .path on it again to get the IO::Path.

It would also be nice to add some documentation how is meant to work, and that method build is called with an IO::Path object which holds an absolute path to the working directory. (In case there is no such doc yet)


Agreed, I will look at where $where comes from and adjust accordingly some time tomorrow.

I also agree that it ought to be a path instead of a string, but wasn't sure if such a change would have other consequences. For example, are there likely to be modules in the wild already using a custom builder which have $where explicitly typed as Str?


This is looking a little more involved than I had assumed. If we want paths to be consistently IO::Paths instead of Strs, changes will be required in several places, unless I've missed something obvious. I'd rather do it properly soon than poorly now, but I'm likely to get to it within another day or two.


I'd think that this is all what is needed (except for the try {} block tadzik mentioned):

diff --git a/lib/ b/lib/
index 2cc21ff..07cafc8 100644
--- a/lib/
+++ b/lib/
@@ -9,7 +9,7 @@ use JSON::Tiny;

 sub tmpdir {
     state $i = 0;
-    ".work/{time}_{$i++}"
+    ".work/{time}_{$i++}".path.absolute

 class Panda {
diff --git a/lib/Panda/ b/lib/Panda/
index 092fbf7..43c3f7c 100644
--- a/lib/Panda/
+++ b/lib/Panda/
@@ -5,9 +5,9 @@ sub dirname ($mod as Str) is export {
     $mod.subst(':', '_', :g);

-sub indir (Str $where, Callable $what) is export {
+sub indir ($where, Callable $what) is export {
     mkpath $where;
-    temp $*CWD = IO::Spec.rel2abs($where);
+    temp $*CWD = $where.path.absolute;

Is Math::ThreeD supposed to fail tests?


FROGGS++ has volunteered to take this issue off my hands as tuits are limited on my end atm

@raydiak raydiak closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 18, 2014
  1. @raydiak
Commits on Feb 20, 2014
  1. @raydiak

    Revert "Pass absolute paths to custom Builders"

    raydiak authored
    This reverts commit a708c13.
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 0 deletions.
Something went wrong with that request. Please try again.