On Mon Jul 21 18:18:58 2014, jkeenan wrote:
> In an effort to give everybody some of what they want, I re-drew the> patches as two patches instead of one squashed one. (Of course, I> thereby run the risk that porting/cmp_version.t will fail.)> > Of course, this guarantees that everyone will be unhappy.> > See commits:> Dragan: fe49d2ed6f822f90ed54ed40f03f306e831b8503> Keenan: c1e7a0a2cac6d665e90d28a4b81db40e72276749> > Marking ticket resolved.> > Thank you very much.> Jim Keenan
@@ -373,10 +373,12 @@ sub spawn_with_handles {
unless eval { $fd->{handle}->isa('IO::Handle') } ;
# If some of handles to redirect-to coincide with handles to
# redirect, we need to use saved variants:
- $fd->{handle}->fdopen(defined($fileno = fileno($open_as = $fd->{open_as}))
- ? $saved{$fileno} || $open_as
- : $open_as,
- $fd->{mode});
+ my $open_as = $fd->{open_as};
+ my $fileno = fileno($open_as);
+ $fd->{handle}->fdopen(defined($fileno)
+ ? $saved{$fileno} || $open_as
+ : $open_as,
+ $fd->{mode});
Doing "$fd->{handle}->fdopen(defined($fileno = fileno($open_as = $fd->{open_as}))" saved a number of perl ops. I wish it stayed, but oh well.
--
bulk88 ~ bulk88 at hotmail.com
---
via perlbug: queue: perl5 status: resolved
https://rt.perl.org/Ticket/Display.html?id=122282