Subject: | redo used incorrectly in LWP::Protocol::http |
'redo' statement is used inside 'do' statement:
174 if (!$has_content || $write_wait || $has_content > 8*1024) {
175 do {
176 # Since this just writes out the header block it
should almost
177 # always succeed to send the whole buffer in a
single write call.
178 my $n = $socket->syswrite($req_buf, length($req_buf));
179 unless (defined $n) {
180 redo if $!{EINTR};
181 if ($!{EAGAIN}) {
182 select(undef, undef, undef, 0.1);
183 redo;
184 }
185 die "write failed: $!";
186 }
This redo propogated to higher level loop (for example if $ua->request
is used inside loop).
Please enclose this construction like described in perlsyn:
See "do" in perlfunc. Note also that the loop control statements
described later will NOT work in this construct, because modifiers
don't take loop labels. Sorry. You can always put another block
inside of it (for "next") or around it (for "last") to do that
sort of
thing. For "next", just double the braces:
do {{
next if $x == $y;
# do something here
}} until $x++ > $z;
PS. Probably also broken in 5.811
Thank you in advance!