I've recently started work on a project that uses mod_perl. I'm attempting to use the Perl debugger to debug some Perl scripts that are running under mod_perl. I start the debugger with the following command:
sudo OPTIONS="-X -DPERLDB" /etc/init.d/httpd restart
The relevant debugging section of perl.conf (included by httpd.conf) is:
<IfDefine PERLDB>
<Perl>
use Apache::DB ();
Apache::DB->init;
</Perl>
<Location />
PerlFixupHandler Apache::DB
</Location>
</IfDefine>
That takes me into the debugger. When I load the required page in the browser, the debugger breaks on the first line of the Perl script that has been wrapped by mod_perl (the app is using PerlRun, btw). I can now step through the code, print variables, and so on.
My problem is that the commands to view source code (l
, -
and v
), don't display anything when inside a Perl script. They work as expected inside a module - that is, if the code steps into a module that is used by the Perl script, the view source commands work.
Is this a known problem with debugging in mod_perl? Is there anything I can do to fix it?
I'm using Apache 2.2.3 and Perl 5.8.8 on CentOS 5.6 x86_64.