Hi all, I started to use Apache::DB (0.06) to interactively debug under mod_perl using ptkdb. I see that is necessary to modify Apache/DB.pm but, after this, the debugger will be run always under ptkdb. The little patch I propose to Apache/DB.pm is to improve Apache to dinamically switch from command line to GUI (ptkdb) interface by configuring this in httpd.conf. To enable ptkdb I add the directive: PerlSetVar PerlTkDB On in preferred place of my httpd.conf. For example:
<Location /someplace> <IfDefine PERLDB> PerlSetVar PerlTkDB On PerlFixupHandler Apache::DB </IfDefine> SetHandler perl-script PerlHandler Apache::MyModule </Location> then start Apache with: % httpd -D PERLDB If Devel::ptkdb isn't installed, then default debug libraries (perl5db.pl) are loaded. ---CUT HERE--- --- DB.pm Thu Feb 28 16:45:29 2002 +++ DB.pm-patched Thu Feb 28 16:31:12 2002 @@ -26,7 +26,9 @@ init(); - require 'Apache/perl5db.pl'; + unless ( $r->dir_config('PerlTkDB') && eval("require 'Devel/ptkdb.pm'") ) { + require 'Apache/perl5db.pl'; + } $DB::single = 1; if (ref $r) { ---CUT HERE--- (run the patch in the same directory of Apache/DB.pm) Any comment will be appreciated. Enrico ========================================================= Enrico Sorcinelli - Gruppo E-Comm - Italia On Line S.p.a. E-Mail: [EMAIL PROTECTED] - [EMAIL PROTECTED] =========================================================