cwd can change, best not to rely on it at all ... I'm frequently inside cwd() of "t" when trying to fix/debug some module, so relying on require "./t/..." would fail
I also often do perl dist-name-version/t/foo.t :) relying on cwd is weak sauce, it can work very often, but its weak practice
| [reply] |
cwd can change
Sure, and I have no objection to the approach you suggested.
However, I write my test suites under the assumption that they're going to be run from "one directory up". If someone complained that they couldn't be run from the 't' directory then I'd likely suggest "stop doing that".
Cheers, Rob
| [reply] |
Well I often have individual tests open in my editor and run them with F5.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
| [reply] |
cwd can change
Sure, and I have no objection to the approach you suggested.
However, I write my test suites under the assumption that they're going to be run from "one directory up". If someone complained that they couldn't be run from the 't' directory then I'd likely suggest "stop doing that".
Cheers,
Rob :) I wouldn't complain to the author, but I would be slightly annoyed and think to myself the author must be an assumer that doesn't understand portability ;)
In your case syphilis it wouldn't shape my opinion of your skills/care/personality, but for authors I'm less familiar with, it would be something I'd remember :) not give much weight to, but, its a quip :)
| [reply] |