$name = "main" . $name if substr($name,0,2) eq "::";
my($fname, $from, $to) = ($DB::sub{$name} =~ /^(.*):(\d+)-(\d+)$/);
if ($from) {
- # XXX this needs local()-ization of some sort
- *DB::dbline = "::_<$fname";
+ local *DB::dbline = "::_<$fname";
++$from while $DB::dbline[$from] == 0 && $from < $to;
return $from;
}
package CLIENT;
use DB;
@ISA = qw(DB);
-
+
# these (inherited) methods can be called by the client
-
+
CLIENT->register() # register a client package name
CLIENT->done() # de-register from the debugging API
CLIENT->skippkg('hide::hide') # ask DB not to stop in this package
# These methods will be called at the appropriate times.
# Stub versions provided do nothing.
# None of these can block.
-
+
CLIENT->init() # called when debug API inits itself
CLIENT->stop(FILE,LINE) # when execution stops
CLIENT->idle() # while stopped (can be a client event loop)