"Graham Barr" <gbarr pobox.com> wrote:
:On Wed, August 29, 2007 7:01 am, hv crypt.org wrote:
:> hv crypt.org wrote:
:> :Just noticed an unusual diagnostic in my server
logs:
:> : Use of uninitialized value in substr at
:> /opt/perl-5.8.1/lib/5.8.1/Net/Cmd.pm line 354.
:> :
:> :Net::Cmd->response() does (in brief):
:> : while (1)
:> : stuff that gets $str
:> : ($code,$more) = $cmd->parse_response($str);
:> : unless (defined $code) {
:> : $cmd->ungetline($str);
:> : last;
:> : }
:> : some more stuff
:> : }
:> : return substr($code, 0, 1);
:> :
:> :Shouldn't the C<last> in that unless block be
rather a C<return
:> CMD_ERROR>?
:> :Else it will always try to C<return substr(undef,
0, 1)>, which doesn't
:> look
:> :right.
:>
:> I just noticed this old message (from 22nd July 2006)
in my pending
:> folder.
:> I haven't seen a response, and bleadperl still looks
exactly as described
:> here.
:>
:> Anybody able to venture an opinion on it?
:
:I would need to see what is being passed to parse_response.
Can you
:recreate this with Debug => 1 passed into ->new and
send me what was on
:STDERR
No sorry, it was a one-off diagnostic in my logs in July
2006.
But on finding C<$code> is undef, the C<last>
drops it directly into
C<return substr($code, 0, 1);>, so do you not agree
that it must be
wrong as stands?
Hugo
|