schwern/test-more — Issue #259: CPAN Regression: DBM-Deep-2.0004 (Issue #249)
Author: cpansprout
Created: 2012-02-28 19:12:04+00:00
State: open

DBM::Deep has been violating TB’s encapsulation since before I (effectively) took over maintenance. I fixed it to work with an early TB2 release, by violating encapsulation a different way (I was in a hurry). But it started failing later, and I’ve just been procrastinating.

Is there any way to tell TB what the current test number is, that doesn’t violate encapsulation?

Currently what t/27-filehandle.t has is this (in a process that finishes a test sequence started by another process):

```
use Test::More 'no_plan';
Test::More->builder->no_ending(1);
if(INC->{"Test/Builder2/History.pm"}) {
Test::More->builder->{History}->counter->set($pre_fork_tests);
}
else { Test::More->builder->{Curr_Test} = $pre_fork_tests; }
```

(I’m using INC-> rather than $INC, because the whole thing is in a double-quoted here-doc.)