in reply to 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. That avoids the problem completely.

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?

Replies are listed 'Best First'.
Re^2: Test::Class modules, skip install
by adrianh (Chancellor) on Jun 06, 2006 at 10:00 UTC
    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.

      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.

Re^2: Test::Class modules, skip install
by Herkum (Parson) on Jun 05, 2006 at 18:16 UTC
    That is a pretty cool idea, thanks! :)
Re^2: Test::Class modules, skip install
by Ovid (Cardinal) on Sep 11, 2006 at 14:34 UTC

    dragonchild wrote test modules should go into t/lib/Test/Foo/Bar.pm.

    In the "better late than never" category, I figured I should mention a slight problem with this. That path should actually be something like t/lib/Tests to avoid potential conflicts with the the Test:: namespace. I speak from painful experience when I named a base testing class Test::Base.

    Cheers,
    Ovid

    New address of my CGI Course.