I found this post searching for help for the same sort of problem. The solutions suggested did not help, but did point me something that did. I've known about the $DB::single variable for some time, and came up with this solution:
if (! $var)
{
$DB::single = 1;
}
Put this in the source file, just before the point of failure, and run the script usign perl -d script.
Execution will stop when $var becomes zero or undef, but only at the point where you put the code. If it changes anywhere else, outside the scope of the test, nothing is done.
The sixty four thousand dollar question is if this has any side effects that might cause other problems. That would be nice to know. Thanks. |