in reply to How do you structure and run module test code?

I usually proceed similarly to Corion. When working on a small project, I often run the tests automatically whenever any file in the structure changes, i.e. after each save. I don't need to leave the editor, but I can check whether I fixed a problem or not.

At work, though, where the number of .pm files is large, we organize the t/ directory as a direct mirror of the lib/ directory, so for each lib/A/B/C.pm, you can easily find its corresponding t/A/B/C.t test file that tests all its public functions or methods, possibly mocking all dependencies. We have special directories for integration tests and larger tests that might need some parts of the whole software running (e.g. the http server to test the RESTful API).

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,