+# Avoid generating "subroutine redefined" warnings with the following
+# hack (from CGI::Carp):
+if (!defined $DB::VERSION) {
+ local $^W=0;
+ eval qq( sub confess {
+ \$SIG{__DIE__} = 'DEFAULT';
+ DXDebug::_store(\$@, Carp::shortmess(\@_));
+ exit(-1);
+ }
+ sub croak {
+ \$SIG{__DIE__} = 'DEFAULT';
+ DXDebug::_store(\$@, Carp::longmess(\@_));
+ exit(-1);
+ }
+ sub carp { DXDebug::_store(Carp::shortmess(\@_)); }
+ sub cluck { DXDebug::_store(Carp::longmess(\@_)); }
+ );
+
+ CORE::die(Carp::shortmess($@)) if $@;
+} else {
+ eval qq( sub confess { Carp::confess(\@_); };
+ sub cluck { Carp::cluck(\@_); };
+ );
+}
+
+