As I was doing a refactor of Test.pm (see r2189) a few thoughts occurred to me.

- Should we remove all the todo_* functions and just use the t/force_todo file?

This would cut the number of functions in Test.pm almost in half, which would decrease loading/parsing time and memory-consumption.

However, since t/force_todo would be larger, and it gets read each time Test.pm is loaded this might not save us any time at all.

Which then lead me to my next thought.

- Should we do away with the t/force_todo file and introduce a force_todo() function?

The idea is to move from the more centralized t/force_todo file to a more decentralized force_todo() function which would accept a list of test numbers which would be forced-TODO on a per-file basis.

One advantage of this would be that there is no performance penalty if the test file is not forcing any TODOs. Currently if you are not forcing TODO in the test file, the whole t/force_todo file must be read.

It would also allow for code like this:

        force_todo(1, 5, 10 .. 15, 25);

Which (IMHO) is nicer than having to do this in the t/force_todo file:

        t/my_test.t 1 5 10 11 12 13 14 15 25

I also think that having the forced-TODOs listed in the test file itself will make it easier to remember to un-force-TODO.

However this is a very large change, and so I wanted to run it by the group before I even started.

Please let me know your thoughts.

- Stevan





Reply via email to