This morning I decided to jump in and start writing some tests around Output.pm. So far I've got 17 tests running, with a few intentionally skipped (if you want to write some of them, please do ... ). My intentions are to have a running test suite so that when someone starts modifying code, they can just run the test suite and see that everything still works. This will take a bit of dedication, both to run the tests every time you get ready to do a 'cvs commit' and to add tests as you add functionality or find bugs. I think we'll all be happier if we can show that kind of dedication. Just as an example, I was also able to drop a bunch of bugfixes into Output.pm. Because I had a test suite around the stuff I changed, it was easier to verify that things worked as expected. One issue that I've uncovered is that prototyping in perl isn't quite what it could/should be. For one thing, it only checks the number of arguments passed in and coerces them to be the type it expects. The other problem is that if you don't pass in the right number of arguments, the program dies with a compile-time error. I think a better idea might be to write some exception handling into the functions. Any thoughts? -pate
participants (1)
-
Pat Eyler