Re: [BUG] line numbering off-by-one with Apache::DB and RegistryCooker

[prev] [thread] [next] [Date index for 2005/03/15]

From: Stas Bekman
Subject: Re: [BUG] line numbering off-by-one with Apache::DB and RegistryCooker
Date: 13:31 on 15 Mar 2005
Dominique Quatravaux wrote:

> Actually it was one, but Thunderbird munged it :-(. Retrying with
> mutt... Sorry for yet another blunder.
[...]
> -   'w' => sub { "use warnings;\n" },
> +   'w' => sub { "use warnings; " },
>  );
>  
>  sub rewrite_shebang {

In which case you will end up with use warnings on the same line as the 
shebang line, no? which will look strange in the debugger

I wonder if it'd be cleaner to use the '#line number filename' directive. 
mp1 had it as an optional feature enabled by $Apache::Registry::MarkLine

	    my $line = $Apache::Registry::MarkLine ?
		"\n#line 1 $filename\n" : "";

the added value is that you tell the compiler/debugger, not only the 
correct line, but also the filename, so the debugger should be able to 
jump to that file. I'm not sure though why it was never put into the main 
stream. May be it didn't quite work?

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

(message missing)

Re: [BUG] line numbering off-by-one with Apache::DB and RegistryCooker
Stas Bekman 13:31 on 15 Mar 2005

Generated at 16:59 on 18 Mar 2005 by mariachi v0.52