Test::Requires checks $builder->can("parent") before calling parent. Because parent is a stub which throws an exception telling the user that parent has been removed... it defeats the point of checking if Test::Builder has a parent method.
Remove the stubs finalize, parent, and child from Test::Builder.
Add a new method is_subtest to return $self->history->is_subtest
This will provide a clean upgrade path from old to new style subtests.
From: @schwern Date: Friday Nov 18, 2011 at 23:19 GMT Orig: https://github.com/Test-More/test-more/issues/229
Test::Requires checks
$builder->can("parent")
before callingparent
. Becauseparent
is a stub which throws an exception telling the user thatparent
has been removed... it defeats the point of checking if Test::Builder has a parent method.finalize
,parent
, andchild
from Test::Builder.is_subtest
to return$self->history->is_subtest
This will provide a clean upgrade path from old to new style subtests.