On Fri, 2007-09-28 at 17:09 -0700, Michael G Schwern wrote:

>> It's also nice to see how far along we are with a running 
>> tally, when I check back in on the running tests.

> How do you accomplish that?

Not sure what you mean. Toggle back to the terminal window, generally.
Due to the nature of the beast (database replication), the full tests
generally take about 7 minutes to complete.

> Why do you do that?  That you have to "check back" indicates that 
> an individual test file takes a long time to run.  The desire to 
> run only some of the tests in a file is usually a red flag 
> that there's too many tests in each file.
>
> Could you simply break the test up into individual files that 
> you could then run individually?

I could, but it gets hairy as there are lots of interconnected
subroutines and common code and it's far easier to keep it in a single
file. Using separate test files is my natural inclination, and I tried
it that way at first, but in this particular module's case, it made my
life easier to have it all in one. Toggling a few boolean values at the
top of the file is easier than trying to keep track of which test files
to run from the command line as well.

>> You mean passing in the raw keys and values? Ick.

> Don't say "ick", say why.  Don't feel, think. [1]  Does it just 
> *feel* wrong or do you know why it actually *is* wrong?

Oh, I know why, I just didn't think I needed to spell it out to this
crowd. :) The problem is that when a user invariably forgets to put in a
hash value, it's more helpful if perl complains about an odd number of
elements at the spot where the user is calling count_tests, not buried
inside of count_tests itself. It also helps the reader see that the
subroutine expects a bunch of key/value pairs, not just a list:

foobar($alpha, $beta); ## List? Hash? Positions matter? Are they
related?

foobar({$alpha => $beta}); ## No ambiguity

> Well, if it's a Playstation 2 you're forgiven. :P

Absolutely PS2. No fancy boxes or cubes here.


-- 
Greg Sabino Mullane [EMAIL PROTECTED]
End Point Corporation 610-983-9073

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to