perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: bug report: wrong line number if using built-in functions
Date Thu, 19 Jun 2008 22:40:02 GMT


Christian Mehring wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
> Line numbers will be wrong if a bulit-in function's first parameter is not
> in the same line.
> 
> Minimized example:
> 
> 01: #!/usr/local/bin/perl
> 02: use strict;
> 03: use warnings;
> 04:
> 05: abs
> 06:
> 07:    5;
> 08:
> 09: die __LINE__;
> 10:
> 11: __END__
> 
> Expected line is 9. Result is 11.
> 
> -> Warnings and dies give wrong line numbers. Finding errors is difficult 
> so.

I've been able to reproduce this problem, and it smells like it might be caused by the
optmizer rolling that statement into a single line...

I don't have time to look much into this, but I've attached a patch to the test
case that illustrates the problem, in case anybody else want to have a shot at this.

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/

Mime
View raw message