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

[perl #118653] [PATCH] Move prototype validation to a separate function / stop munging whitespace on parse

Thread Next
From:
Tony Cook via RT
Date:
June 28, 2013 06:37
Subject:
[perl #118653] [PATCH] Move prototype validation to a separate function / stop munging whitespace on parse
Message ID:
rt-3.6.HEAD-2552-1372401440-641.118653-15-0@perl.org
On Thu Jun 27 19:43:13 2013, pcm wrote:
> Prototypes defined inline currently have spaces removed for no other
> reason than to simplify processing.  This leads to inconsistencies
> between defining a prototype inline and attaching it after the fact.
> 
> Also, since the logic for generating warnings is only stored in the
> tokenizer itself, if something like set_prototype or a prototype
> attribute wanted to do illegalproto warnings, it would have to
> duplicate that logic.  Moving the code into a separate function allow
> for code reuse for other mechanisms of setting the prototype.
> 
> If this patch is accepted, please apply and hold this ticket open;
> perldelta will need to be updated, and I'm not sure of how that should
> be done, and in the meantime I can base a couple of other illegal
> proto warnings fixed off of the new function.

This works for me and looks sane, but I'm going to wait for any further
comment for a few days.

Especially on the public/private part.

Tony

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

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