projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
put in some more loop protection.
[spider.git]
/
perl
/
DXDebug.pm
diff --git
a/perl/DXDebug.pm
b/perl/DXDebug.pm
index 64ed843944d7d478c4466f541933e75bca0af418..c44ba35920f5d049291a4021b78b845c1406a606 100644
(file)
--- a/
perl/DXDebug.pm
+++ b/
perl/DXDebug.pm
@@
-11,8
+11,8
@@
package DXDebug;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(dbg dbgadd dbgsub dbglist isdbg);
-@EXPORT_OK = qw(dbg dbgadd dbgsub dbglist isdbg);
+@EXPORT = qw(dbg dbgadd dbgsub dbglist isdbg
dbgclose
);
+@EXPORT_OK = qw(dbg dbgadd dbgsub dbglist isdbg
dbgclose
);
use strict;
use vars qw(%dbglevel $fp);
use strict;
use vars qw(%dbglevel $fp);
@@
-36,6
+36,12
@@
if (!defined $DB::VERSION) {
};
}
};
}
+sub dbgclose
+{
+ $SIG{__DIE__} = $SIG{__WARN__} = 'DEFAULT';
+ $fp->close();
+}
+
sub dbg
{
my $l = shift;
sub dbg
{
my $l = shift;