develooper Front page | perl.perl5.porters | Postings from December 2016

[perl #130122] [PATCH] Cleanup two argument open usage.

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
December 23, 2016 19:06
Subject:
[perl #130122] [PATCH] Cleanup two argument open usage.
Message ID:
rt-4.0.24-13165-1482519981-1033.130122-15-0@perl.org

> > > On Thu, 17 Nov 2016 17:52:28 GMT, john@nixnuts.net wrote:
> > > > This is a bug report for perl from john@nixnuts.net,
> > > > generated with the help of perlbug 1.40 running under perl
> > > > 5.25.7.
> > > >
> > > >
> > > > -----------------------------------------------------------------
> > > > The attached patch removes most two argument open() calls in the
> > > > Perl codebase.
> > > >
> > > > The 'cpan' and 't' directories were skipped.
> > > > Filehandle cloning was left as-is for 5.6.2 compatibility.
> > > >
> > > > Notable changes:
> > > > - Storable
> > > > - Devel::SelfStubber
> > > > - Unicode::UCD
> > > > - win32/bin/search.pl
> > > >


Pushed to blead in commit 1ae6ead94905dfee43773cf3b18949c91b33f9d1.

John, can you double-check that commit against your original patch?

Since the patch was large and submitted some time ago, blead had moved.  So the original patch did not apply cleanly.  I essentially took it apart and applied it in chunks via 'patch'.  Then I had to increment certain $VERSION numbers and run certain programs to pass the porting tests.  So your proofreading would be helpful to make sure I didn't miss anything crucial.

Also, you might want to submit -- in a new perlbug ticket -- a patch to clean up 2-arg open() calls like the following which still remain.

#####
$> cat dist/Storable/t/code.t

193     open(SAVEERR, ">&STDERR");
194     open(STDERR, '>', $devnull) or
195     ( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) );
196 
197     eval { $freezed = freeze $obj[0]->[0] };
198 
199     open(STDERR, ">&SAVEERR");
#####

Thank you very much.


-- 
James E Keenan (jkeenan@cpan.org)

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

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