Home
> Uncategorized > Once a Week a happy zef
Once a Week a happy zef
Since zef installs modules to a temporary directory and may or may not set the $*CWD
to what we would like, we need to open files in tests carefully. Given that files of interest to a test file are in the same or a child directory of the test, we can operate relative to $*PROGRAM.
my $gitconfig-path = $*PROGRAM.parent.child('data').child('gitconfig');
That would translate to t/data/gitconfig
seen from the modules base directory.
Categories: Uncategorized
Why not use `$?FILE` inside the test?
Because I didn’t think of `$?FILE`, maybe because it feels debugish. For a single file program it should do the same as `$*PROGRAM`.