On Jan 27, 2006, at 6:06 PM, James E Keenan wrote:

Steffen Schwigon wrote:
Quite often -l (to read from lib/) is enough, depending on your module
build complexity. For -b you have to call ./Build before "prove",
which can be annoying and/or difficult to remember.
I'll have to try that out. My modules all use MakeMaker rather than Module::Build. And I'm generally using 'prove' to trouble- shoot individual tests after I've already run 'make test' and identified which test files have failures.

For modules that are in {src_dir}/lib/ I have often had my individual .t files do this:

    use FindBin qw($Bin);
    use lib "$Bin/../lib";

I often have a situation which probably doesn't come up for most Perl developers - I usually develop these days using the EPIC plugin for Eclipse, and it doesn't have an easy way to execute 'prove' or 'make test', but it can execute Perl scripts in my source directory, so, it is useful for me to be able to have each .t file be executed by a process whose $PWD might be outside the source directory. Usually I use a little script 'run_tests.pl' that basically does what 'prove -v t' does, and have Eclipse execute that. The run_tests.pl script uses FindBin so it knows where lib/ and t/ are.

Reply via email to