2 # The system variables - those indicated will need to be changed to suit your
3 # circumstances (and callsign)
5 # Copyright (c) 1998 - Dirk Koopman G1TLH
14 @EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist isdbg dbgclose);
15 @EXPORT_OK = qw(dbginit dbg dbgadd dbgsub dbglist isdbg dbgclose);
18 use vars qw(%dbglevel $fp);
25 $fp = DXLog::new('debug', 'dat', 'd');
30 $fp->writeunix($t, "$t^$@") if $@;
31 $fp->writeunix($t, "$t^$!") if $!;
33 $fp->writeunix($t, "$t^$_");
40 # add sig{__DIE__} handling
41 if (!defined $DB::VERSION) {
42 $SIG{__WARN__} = $SIG{__DIE__} = \&_store;
48 $SIG{__DIE__} = $SIG{__WARN__} = 'DEFAULT';
61 print "$_\n" if defined \*STDOUT;
62 $fp->writeunix($t, "$t^$_");
72 $dbglevel{$entry} = 1;
81 delete $dbglevel{$entry};
87 return keys (%dbglevel);