I've hacked Devel::ptkdb and Apache::DB a bit as suggested by
http://article.gmane.org/gmane.comp.apache.mod-perl/7562
changed a bit for MP2
and
http://perl.apache.org/docs/1.0/guide/debug.html#ptkdb_and_Interactive_mod_perl_Debugging
Now, I get the gui but no contents are displayed in it. If I step over a few times (blindly) I end up in .....
package IO::Handle::DESTROY
the gui then dies and the output is displayed in the browser.
If I manage to hit a process that's already run the debugger, i am able to see my program in the gui all wrapped in the ModPerl namespace but I still can't manage to step through the code.
I still end up at IO::Handle::DESTROY
Has everyone had to hack apache::DB and Devel::ptkdb ???
It's the same for a single or multi processess running.
Am really curious about this.
#!/usr/bin/perl -d:ptkdb
use strict;
sub BEGIN {
$ENV{DISPLAY} = 'localhost:0.0';
}
print 'Content-type: text/html' . "\n\n";
print "$$<br />";
print 'Hello<br />';
print 'Goodbye';
my $struct = { key1 => [ qw| Hello World |, { key2 => 'At Last!!' } ] };
print; ## just so I can see the contents of $struct
-Ants
Jeff Pang <[EMAIL PROTECTED]> wrote:
Hello,
Have you loaded the ModPerl::Registry?How can you know your modperl scripts can't be run?
When you meet problems,you can look at the error_log where you could find most of the problems.
And,here is my mp2 config,it can run well for me:
PerlModule ModPerl::Registry
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
Good luck!
-----Original Message-----
>From: Anthony Gardner <[EMAIL PROTECTED]>
>Sent: Oct 13, 2006 3:53 AM
>To: mod_perl[EMAIL PROTECTED]>
>Subject: apache2 and ptkdb
>
>I'm having problems getting ptkdb to work under ModPerl::Registry.
>
>this works but it won;t be running under mod_perl
>
>
> AllowOverride Limit
>## SetHandler perl-script
>## PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
>
>
>the following won't work at all
>
>
> AllowOverride Limit
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
>
>
>any ideas greatly appreciated
>
>CIA
>
>-Ants
>
>
>
>
>---------------------------------
> Try the all-new Yahoo! Mail . "The New Version is radically easier to use" ?The Wall Street Journal
--
Books below translated by me to Chinese.
Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/
Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/
Send instant messages to your online friends http://uk.messenger.yahoo.com