On Apr 17, 2008, at 12:48 PM, Michael G Schwern wrote:
Chris Dolan wrote:
Interesting reactions:
* People were appalled that Test::Class invokes methods in alphabetic order instead of lexical order

It seems odd to me that people would be so concerned about the order of execution, given the methods should be able to be executed in any order. Any idea why that was an issue?

Compare the lexical order to the TAP output:

-------------------------------
package My::Test;
use base 'Test::Class';

sub foo :Test(1) {
   pass('foo');
}
sub bar :Test(1) {
   pass('bar');
}
1;
-------------------------------
1..2
ok 1 - bar
ok 2 - foo
-------------------------------

That's counter-intuitive. I appreciate that the order is highly deterministic, but it's baffling to anyone who hasn't read the Test::Class documentation carefully. Of course, that's just the harness-less output. With a harness, T::C emits diag()s with the method names, which helps dramatically.

I don't want to make too big a deal about this -- the invocation order IS documented adequately -- but it was my first reaction and it was a common reaction at my presentation.
Chris

Reply via email to