in reply to Different behavior running tests under prove vs. MB/EUMM

I made a discovery. Try adding -b to prove. It adds the blib directories to @INC.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Different behavior running tests under prove vs. MB/EUMM
by dragonchild (Archbishop) on Nov 03, 2007 at 14:34 UTC
    I prefer using -l instead. That adds the lib directories. My standard is "prove -lv t/(file).t".

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

      I have no doubt that you understand why -l works for you, but just to provide a counterpoint, I don't use -l for my own distributions, as I like putting the main .pm file in the base directory of the unpacked distribution, for the simple matter that it makes it a tad easier to pull into an editor.

      There are also distributions that munge the .pm significantly on its flight from ./lib (or .) to ./blib, or even generate it ex nihilo. In these circumstances, -l doesn't produce the same results as -b.

      That said, I understand why you like -l. It means you can edit the source .pm file, and run the prove test immediately, without having to run make (or ./Build) in between. There's nothing worse than making a change to the module, and then spending considerable time wondering why it didn't fix the test suite :)

      • another intruder with the mooring in the heart of the Perl

        The directory lib/, not the stuff that use lib would find.

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?