Greg Sabino Mullane wrote: > I just released Bucardo, a multi-master replication system for Postgres. > It has a fairly intense test suite, and I was developing it, I ended up > writing Yet Another Test Counter. At some point, I decided to turn it > into a proper module. Here's the POD page: > > http://bucardo.org/test_dynamic/Dynamic.pm.html > > Comments and feedback welcome. I was not trying to solve everyone's > counting problems, just my own, but offer it in the hopes someone else > will find it useful. > > Any feedback on the Bucardo tests would be appreciated as well: > > http://bucardo.org/bucardo.files/t/ > > (That helper file is needed because Bucardo does a lot of forking which > confuses Test)
I think the whole idea is doomed, but you know that. That it needs annotation to get by seems to defeat the point of making the test count more convenient. What's wrong with no_plan? Why go through backflips to automate counting the tests when you can just not count them? Seems needlessly officious. Nits... * count_tests() is not a method, it's a function. It should either be a class method or just export it. See http://use.perl.org/comments.pl?sid=36423&op=&threshold=0&commentsort=0&mode=thread&cid=56862 for my general argument for just exporting. At the very least give an option to export. * The SYNOPSIS says... my $tests = Test::Dynamic::count_tests ( { filehandle => \*DATA, verbose => 1, local => [qw(compare_tables)] } ); plan tests => $tests; It's easier to read and more compact as: plan tests => count_tests({ filehandle => \*DATA, verbose => 1, local => [qw(compare_tables)] }); * Why does count_tests() take a reference? A hash will do perfectly well. * Lord I hate tabs. -- Stabbing you in the face so you don't have to.
