X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXDebug.pm;h=2cbdc2956e937b2e64fce2bf12354f271a37cdab;hb=95a03441d20680a914673d1b6bbf46c0d673ad4c;hp=766dacbd2a01187c35941cfc1e047d164ab1d799;hpb=b67b50de92dbf61ce939b42f7c74e30dc58eba41;p=spider.git diff --git a/perl/DXDebug.pm b/perl/DXDebug.pm index 766dacbd..2cbdc295 100644 --- a/perl/DXDebug.pm +++ b/perl/DXDebug.pm @@ -43,9 +43,10 @@ if (!defined $DB::VERSION) { CORE::die(Carp::shortmess($@)) if $@; } else { - eval qq( sub confess { Carp::confess(\@_); }; - sub croak { Carp::croak(\@_); }; - 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(\@_); }; ); } @@ -69,7 +70,15 @@ sub dbginit { # 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(@_)); }; }