projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change the self altering logic a bit
[spider.git]
/
perl
/
DXDebug.pm
diff --git
a/perl/DXDebug.pm
b/perl/DXDebug.pm
index 77ad46396406d362e3de927b41ca1a45dadf2261..f7598c151bb4db5a420ac654a4fea40b659ab47c 100644
(file)
--- a/
perl/DXDebug.pm
+++ b/
perl/DXDebug.pm
@@
-11,14
+11,14
@@
package DXDebug;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(dbginit dbgstore dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck
cluck
);
+@EXPORT = qw(dbginit dbgstore dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck);
use strict;
use vars qw(%dbglevel $fp);
use DXUtil;
use DXLog ();
use strict;
use vars qw(%dbglevel $fp);
use DXUtil;
use DXLog ();
-use Carp
qw(cluck
);
+use Carp
(
);
%dbglevel = ();
$fp = undef;
%dbglevel = ();
$fp = undef;
@@
-43,8
+43,10
@@
if (!defined $DB::VERSION) {
CORE::die(Carp::shortmess($@)) if $@;
} else {
CORE::die(Carp::shortmess($@)) if $@;
} else {
- eval qq( sub confess { Carp::confess(\@_); };
- sub cluck { Carp::cluck(\@_); };
+ eval qq( sub confess { die Carp::longmess(\@_); };
+ sub croak { die Carp::shortmess(\@_); };
+ sub cluck { warn Carp::longmess(\@_); };
+ sub carp { warn Carp::shortmess(\@_); };
);
}
);
}
@@
-53,13
+55,13
@@
sub dbgstore
{
my $t = time;
for (@_) {
{
my $t = time;
for (@_) {
- chomp;
- my @l = split /\n/;
+ my $r = $_;
+ chomp $r;
+ my @l = split /\n/, $r;
for (@l) {
for (@l) {
- my $l = $_;
- $l =~ s/([\x00\x08\x0B-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
- print "$l\n" if defined \*STDOUT;
- $fp->writeunix($t, "$t^$l");
+ s/([\x00-\x08\x0B-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
+ print "$_\n" if defined \*STDOUT;
+ $fp->writeunix($t, "$t^$_");
}
}
}
}
}
}