[Wellington-pm] indirect object notation

Richard Hector richard at walnut.gen.nz
Fri May 16 20:44:52 PDT 2014


Hi all,

I'm having a play with Net:XMPP, and getting this error:

Undefined subroutine &Net::XMPP::Debug called at
/usr/share/perl5/Net/XMPP/Connection.pm line 82.

(This is on Debian Wheezy)

Looking at that section, I find this:

$self->{DEBUG} =
  new Net::XMPP::Debug(level      => $self->_arg("debuglevel",-1),
                       file       => $self->_arg("debugfile","stdout"),
                       time       => $self->_arg("debugtime",0),
                       setdefault => 1,
                       header     => "XMPP::Conn"
                    );

.. which I understand uses "indirect object notation", which I gather is
deprecated, right? Is that the reason perl thinks there should be such a
subroutine?

Should I file a bug? Is there likely to be something in the way I'm
calling this module that causes this to show up?

This is enough to do it:

---------------8<----------------
#!/usr/bin/perl
use strict;

use Net::XMPP::Client;

my $client = Net::XMPP::Client->new();

$client->Execute(
    hostname  => "example.com",
    username  => "exampleuser",
    password  => "examplepass",
);
---------------8<----------------

It's mostly straight from the docs, except not creating the object with
indirect notation (that makes no difference).

Cheers,

Richard


More information about the Wellington-pm mailing list