# from Michael G Schwern # on Sunday 17 February 2008 11:15: >> Should I just call them chdir and unchdir? > >Go with the patch I proposed to implement a simplified > pushd/local_chdir() for Module::Build internal use.
Well, I committed it as chdir_in() and chdir_original(). The local_chdir() with sentinel might also be useful, but it seems that most tests typically just need to enter the directory. This pair of methods only goes unconditionally in/back and doesn't concern itself much with what happened in-between. The $dist->regen() works wherever you are and MBTest's recent tmpdir() setup solve the cleanup per-process. So, writing tests is much easier than before (though maybe that's just because I've lost some of my newbiness.) --Eric -- If the collapse of the Berlin Wall had taught us anything, it was that socialism alone was not a sustainable economic model. --Robert Young --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------