develooper Front page | perl.perl5.porters | Postings from April 2010

Re: [perl #74404] h2ph using deprecated goto

Thread Previous
Todd Rinaldo
April 16, 2010 13:31
Re: [perl #74404] h2ph using deprecated goto
Message ID:

On Apr 16, 2010, at 6:02 AM, Zefram wrote:
> Todd Rinaldo wrote:
>> Use of "goto" to jump into a construct is deprecated at utils/h2ph line 349, <IN> line xxxx
> You could factor out the EMIT code into a subroutine.  Call it from both
> the current "EMIT:" and "goto EMIT" sites.

It looks like h2ph makes copious use of global variables. As a result, I can commit this evil for a minimal patch. No code was changed moving it into the sub other than passing $proto, which is the only non-global used (but not modified).

I tried a 5.12.0 build with this patch and it seems to be passing tests. there is a lib/h2ph.t file but I don't know what it tests exactly.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About