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.