in reply to Re: Test::Class modules, skip install
in thread Test::Class modules, skip install

Your test modules should go into t/lib/Test/Foo/Bar.pm and you should do a "use lib 't/lib'" in your .t files

s/should/can/ - installing test modules can be a good thing if they can be useful for people sub-classing your code.

  • Comment on Re^2: Test::Class modules, skip install

Replies are listed 'Best First'.
Re^3: Test::Class modules, skip install
by dragonchild (Archbishop) on Jun 06, 2006 at 13:20 UTC
    People subclassing your code should look at your distribution for how to test it. In that case, they'll find your test classes.

    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?
      People subclassing your code should look at your distribution for how to test it.

      Again - I question "should".

      They don't have to look to my distribution to figure out how to code the subclass - why should they need to do so to figure out how to test it? Especially now that testing is a more central part of development for many people.

        They don't have to look to my distribution to figure out how to code the subclass

        Maybe, if the subclasser both is disciplined and doesn't want to do very much (like add new attributes). However, a lot of subclassing involves overriding private methods, adding new attributes, and other potentially invasive procedures. As such, the subclasser will need to read the code in order to understand implementation details.

        Me, I always read the distribution because the distribution may involve OS-specific installation tasks. PDF-Template and Excel-Template both do and I learned that trick by reading other Makefile.PL's. *shrugs*


        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?