On Fri, Oct 28, 2011 at 3:23 AM, Ovid <curtis_ovid_...@yahoo.com> wrote: > Moving along, the *idea* of a nested TAP is so conceptually simple that if > the implementing code is struggling with it, perhaps it's a sign that there > are some design decisions which should be revisited? When I find conceptually > simple ideas hard to do, I find it a code smell. (note that I'm not saying > the actual design is bad. I haven't looked). I also find subtests so > incredibly convenient and opens up so many possibilities that I would hate to > lose them (and I use them a lot).
Without looking at the actual code, I would guess that the complexity is implementing subtests while preserving the legacy procedural interface that wraps calls to a global singleton. Conceptually, this doesn't seem hard: my $t = Test::SuperDooper->new; $t->is(...); $t->subtest( $label => sub { my $t = shift; $t->is(...); ); $t->done_testing; Tests would be recorded in an object and subtest subroutines get passed a (new) test object. But that's *not* the Test::More interface we all know and love so the interface has to fake that with globals/local() that we can all imagine (even without going to the code). So that design decision is sort of forced due to the API. I agree that given the existence of nested TAP now, I wouldn't want to see it removed, so I'm not sure what complexity Schwern is looking to eliminate -- whether it's existing complexity or potential new complexity implementing new features. -- David