projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add skeletons for new commands Rt, Ping and T.
[spider.git]
/
perl
/
DXDebug.pm
diff --git
a/perl/DXDebug.pm
b/perl/DXDebug.pm
index 40cb3a257e1128651683a59dfe6fe0830d3334e3..30fe2b25d4dee2f6cd1383c674dca655be6f12f3 100644
(file)
--- a/
perl/DXDebug.pm
+++ b/
perl/DXDebug.pm
@@
-11,7
+11,7
@@
package DXDebug;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck);
+@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump
dbglog
isdbg dbgclose confess croak cluck);
use strict;
use vars qw(%dbglevel $fp $callback $cleandays $keepdays);
use strict;
use vars qw(%dbglevel $fp $callback $cleandays $keepdays);
@@
-26,6
+26,12
@@
$callback = undef;
$keepdays = 10;
$cleandays = 100;
$keepdays = 10;
$cleandays = 100;
+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
# Avoid generating "subroutine redefined" warnings with the following
# hack (from CGI::Carp):
if (!defined $DB::VERSION) {
# Avoid generating "subroutine redefined" warnings with the following
# hack (from CGI::Carp):
if (!defined $DB::VERSION) {
@@
-180,6
+186,13
@@
sub dbgclean
}
}
}
}
+sub dbglog
+{
+ my $sort = shift;
+ my $l = shift;
+ dbg($l);
+ DXLog::Log($sort, $l);
+}
1;
__END__
1;
__END__