On 28 Feb 2008, at 02:54, Andy Armstrong wrote:
sub watchfunction {
if ( @DB::testbreak ) {
require Test::Builder;
my $current = Test::Builder->new->current_test;
if ( $current + 1 >= $DB::testbreak[0] ) {
shift @DB::testbreak
while @DB::testbreak && $current + 1 >=
$DB::testbreak[0];
my $depth = 1;
while ( 1 ) {
my ( $package, $file, $line ) = caller $depth;
last unless defined $package;
last unless $package =~ /^Test::/;
$depth++;
}
$DB::stack[ -$depth ] = 1;
}
}
return 1;
}
That should be s/return 1/return/ at the end. Sorry, I edited from my
real ~/.perldb (which contains a load of other stuff) without testing
it properly.
--
Andy Armstrong, Hexten