sendxmpp: perl error but still completes sending

Christoph Biedl debian.axhn at manchmal.in-ulm.de
Sun Jul 2 21:29:29 UTC 2017


Russell Coker wrote...

> # echo test| sendxmpp russell at coker.com.au
> Use of uninitialized value in numeric eq (==) at /usr/share/perl5/XML/Stream.pm line 631

Same here, and it's arguable who is to blame for this.

sendxmpp calls Connect (l.327ff) with tls set to whatever the caller
provided, default undef. It's common practise in Perl to treat undef as
a false value.

Net::XMPP::Connection::Connect however, as documented in
Net::XMPP::Client, expects a defined value, either 0 or 1, but happily
stores any other value the caller gave, including undef.

That undefined value eventuall triggers the warning. No harm done
otherwise since the check will fail in the right direction. So it's just
annoying.

In my opinion the place to fix this is sendxmpp, it's also easier to do.
Although I'd have to have a word with the Net::XMPP authors as their
code is quite un-Perlish.

    Christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20170702/64a3a801/attachment-0001.sig>


More information about the pkg-perl-maintainers mailing list