This is native code of mod_perl:
ModPerl::RegistryCooker::get_mark_line () sub get_mark_line { my $self = shift; $ModPerl::Registry::MarkLine ? "\n#line 1 $self->{FILENAME}\n" : " +"; }
So #line is fixed to 1. That $line, as it is, is joined with other stuff to build an $eval (in the same file, method:  sub convert_script_to_compiled_handler { ( code ):
my $eval = join '', 'package ', $self->{PACKAGE}, ";", "sub handler {", "local \$0 = '$script_name';", $nph, $shebang, $line, <------------------------------ ${ $self->{CODE} }, "\n}";
Anyhow it doesn't (always) work. With Apache::DB (the Perl debugger under mod_perl), The value 1 NEVER works on the FIRST file which is loaded. But it works magically if I step into another file, and still doesn't work when I return back in the first file. After this hint which suggested to write the 'next' line, I found that in my case it worked changing the value from 1 to 3 (2nd line was the shebang and 2 didn't work either). But in other cases, where the first loaded file is different I didn't find any working value. 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.

In reply to right usage of #line ?? by jjmoka

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.