schwern/test-more — Issue #220: Restore $builder->name
Author: schwern
Created: 2011-11-17 07:36:02+00:00
State: open
Labels: DO IT, Easy, Test-Builder2

Implementing subtests forced the removal of some now irrelevant bits of the public Test::Builder API which exposed internal details of how subtests were done. `finalize`, `child`, `parent`, and `name` are gone.

`parent`, `finalize` and `child` cannot be restored as the concept of a child copy of Test::Builder for subtests no longer exists. `finalize` might be faked... but if you're using methods that closely related to the old version of subtests it's better things just break loudly and quickly rather than quietly and subtly.

`$builder->name` can be restored. It simply returns the name of the current subtest. Outside of a subtest, use `$0`. Subtests now always have names, so there's no need to implement the "Child of $parent->name" default.