> On 4/22/07, via RT Flavio Poletti
<perlbug-followup perl.org> wrote:
>
> I think this is just another instance of the issues
discussed in RT
> ticket #37302.
>
> Rafael commented:
>
> There is a whole class of problems like this that are
due to the way
> perl remembers line numbers in the compiled code.
Basically they are
> stored only at statement boundaries, not at each op.
perl thus reports
> the line number of the current statement. Add to this
the fact that
> some statements are optimized away, yacc's handling
of error recovery
> and lookahead, and probably some black magic
performed by the lexer
> in double-quoted strings, and you'll end up with the
assurance that
> it's pretty impossible to guarantee a correct line
number in error
> messages in all cases.
>
> and maybe this can make companion to these and the
other tickets that
> Steve Peters found:
>
> Hmmm...the past repeats itself...
>
> #6837 - line number dichotomy on warnings
> #7097 - compile time error in elsif printed with line
no of if
> #28282 - Wrong line number for errors in
"elsif" conditions
>
I suspected that I couldn't possibly be the first to
discover such an
evident thing. I tried to search perlbug for other
instances, but I looked
for "undef" in the title - sorry for the traffic.
At this point, I've two further questions:
* is there a place where one can quickly discuss such things
before
posting a real bug report? Or is it better to file a bug
report anyway?
* shouldn't we document this clearly in the docs? I didn't
find anything
applicable.
Thank you for your patience and best regards,
Flavio.
|