projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more bandaids
[spider.git]
/
perl
/
DXDebug.pm
diff --git
a/perl/DXDebug.pm
b/perl/DXDebug.pm
index 790b398d1666d73c431f58d9560ae8ba50c1caee..2cbdc2956e937b2e64fce2bf12354f271a37cdab 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(\@_); };
);
}
);
}
@@
-68,7
+70,15
@@
sub dbginit
{
# add sig{__DIE__} handling
if (!defined $DB::VERSION) {
{
# add sig{__DIE__} handling
if (!defined $DB::VERSION) {
- $SIG{__WARN__} = sub { dbgstore($@, Carp::shortmess(@_)); };
+ $SIG{__WARN__} = sub {
+ if ($_[0] =~ /Deep\s+recursion/i) {
+ dbgstore($@, Carp::longmess(@_));
+ CORE::die;
+ } else {
+ dbgstore($@, Carp::shortmess(@_));
+ }
+ };
+
$SIG{__DIE__} = sub { dbgstore($@, Carp::longmess(@_)); };
}
$SIG{__DIE__} = sub { dbgstore($@, Carp::longmess(@_)); };
}