in reply to right usage of #line ??

This is native code of mod_perl: ...ModPerl::RegistryCooker... Anyhow it doesn't (always) work. With Apache::DB (the Perl debugger under mod_perl), .. Usually I focus on MY code, to start searching where the problem is. Here I'm wondering what's wrong. Any idea or previous experience on this, are both welcome.

??Why not set a breakpoint in the code manually ? $DB::single=2; ## breakpoint

??Do you grok CGI to mod_perl Porting. mod_perl Coding guidelines??

Replies are listed 'Best First'.
Re^2: right usage of #line ??
by Anonymous Monk on Sep 08, 2015 at 07:35 UTC
    Thanks Monk. Breakpoints work already. Is the number of line that is not agreed between what mod_perl writes down (fixed #1) and what the Apache::DB tries to understand. The following 4 lines snippet makes it clear:
    1 #!/usr/bin/perl 2 my $a=2; 3 print "Content-type: text/plain\n\n"; 4 print "$a\n";
    $my eval is 'evaluated' by mod_perl as:
    package ModPerl::ROOT::ModPerl::PerlRun::home_jjmoka_TEST_code_test +2_2epl;sub handler {local $0 = '/home/jjmoka/TEST/code/test2.pl'; #line 1 /home/jjmoka/TEST/code/test2.pl #!/usr/bin/perl my $a=2; print "Content-type: text/plain\n\n"; print "$a\n";
    And that doesn't work. In that case I must fix "#line 1" to "#line 3", and the debugger is able to step each line normally. With any other value X different from 3 "#line X" I see only blank lines on each step. Anyhow 3 is not the solution for every snippet I decide to submit.