develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #118629] [PATCH] Perl_cv_ckproto_len_flags is sensitive to spaces and shouldn't be

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
June 26, 2013 01:56
Subject:
[perl #118629] [PATCH] Perl_cv_ckproto_len_flags is sensitive to spaces and shouldn't be
Message ID:
rt-3.6.HEAD-2552-1372211785-73.118629-15-0@perl.org
On Mon Jun 24 23:02:26 2013, pcm wrote:
> Similar to RT 118623, Perl_cv_ckproto_len_flags is sensitive to spaces
> when doing its checks for warnings.
> 
> For example,
> 
> perl -MScalar::Util=set_prototype -e 'BEGIN { set_prototype \&foo, "
> \$ "; } sub foo($){}'
> Prototype mismatch: sub main::foo ( $ ) vs ($) at -e line 1.
> 
> Which doesn't match the behavior if toke.c throws away the spaces:
> 
> perl -e 'sub foo( $ ); sub foo($){}' # No issues
> 
> Patch attached.  The current ckproto is some code to produce the
> warning inside of a 13 line if statement; instead of trying to nest
> the cleanup in there, I broke those 13 lines into separate if () {
> return; } blocks.  If that's too much churn inside the function, I'll
> redo it with fewer lines of code changed.

The UTF8f changes have been reverted, which means this patch no longer
applies.

One issue with your patches - could you please keep the Subject of the
patch itself short, for example, this patch has a subject of:

Perl_cv_ckproto_len_flags should disregard spaces This included breaking
down the original large if block into smaller, more manageable chunks.

(all one line)

Ideally a git commit should have a short subject describing the change,
with any other notes after a blank line.

Thanks,
Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118629

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About