Subject: | Don't grab at Test::Builder hash keys |
Test::Aggregate grabs at an internal Test::Builder hash key rather than
going through an accessor. $BUILDER->{Test_Results} can be gotten
through $BUILDER->details. Since you only want the current test number,
$BUILDER->current_test is fine.
Undocumented assumptions about Test::Builder will break in 2.0.
--- a/lib/Test/Aggregate.pm
+++ b/lib/Test/Aggregate.pm
@@ -297,7 +297,7 @@ sub run {
# some tests may have been run in BEGIN blocks. This is deprecated and
# now warns
my $tab = 'Test::Aggregate::Builder';
- $BUILDER->{$tab}{last_test} = @{ $BUILDER->{Test_Results} } || 0;
+ $BUILDER->{$tab}{last_test} = $BUILDER->current_test || 0;
$BUILDER->{$tab}{aggregate_program} = $self->{aggregate_program};
my $current_test = 0;