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

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

From: Stas Bekman
Subject: Re: [BUG] line numbering off-by-one with Apache::DB and RegistryCooker
Date: 16:51 on 18 Mar 2005
Dominique Quatravaux wrote:
> I wrote:
> 
> 
>>Stop the press! My patch was incomplete:
> 
> 
> ... and this one was incomplete too, I forgot about the POD. It looks
> like I am doomed to make a fool of myself in every conceivable way on
> this list :-( Apologies yet again.
[...]

That's cool, it wasn't committed yet :) Thanks for the complete patch, 
Dominique!

> -sub rewrite_shebang {
> +sub shebang_to_perl {
>      my $self = shift;
>      my($line) = ${ $self->{CODE} } =~ /^(.*)$/m;
>      my @cmdline = split /\s+/, $line;

also needed to add:

-    return unless @cmdline;
-    return unless shift(@cmdline) =~ /^\#!/;
+    return "" unless @cmdline;
+    return "" unless shift(@cmdline) =~ /^\#!/;

and please avoid using tabs, I've removed those (we use ident 4) ;)

It's now comitted.

Thanks again, Dominique!

        -- 
        __________________________________________________________________
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 16:51 on 18 Mar 2005

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