Skip Menu |
 

This queue is for tickets about the Net-Jabber CPAN distribution.

Report information
The Basics
Id: 66806
Status: new
Priority: 0/
Queue: Net-Jabber

People
Owner: Nobody in particular
Requestors: hoti [...] feedyourhead.at
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net::Jabber::Protocol: Can't locate object method "new" via package "Net::Jabber::Query"
Date: Wed, 23 Mar 2011 10:41:53 +0100
To: bug-Net-Jabber [...] rt.cpan.org
From: Hoti <hoti [...] feedyourhead.at>
Hi, i am trying to make a FileTransferOffer: sub SendFile { my (%args) = @_; main::pd("Sending file ..."); $Con->FileTransferOffer( jid => $args{jid}, sid => $args{stream_id}, filename => $args{filename}, methods => [ "http://jabber.org/protocol/si/profile/bytestreams"], mode=>"passthru" ); } but i'll get the following error: Can't locate object method "new" via package "Net::Jabber::Query" at /usr/share/perl5/Net/Jabber/Protocol.pm line 1662 (#2) (F) You called a method correctly, and it correctly indicated a package functioning as a class, but that package doesn't define that particular method, nor does any of its base classes. See perlobj. Line 1662 in Protocol.pm: ############################################################################### # # FeatureNegQuery - given a feature hash, return a query that contains it. # ############################################################################### sub FeatureNegQuery { my $self = shift; my $features = shift; my $tag = "query"; $tag = $Net::Jabber::Query::TAGS{'http://jabber.org/protocol/feature-neg'} if exists($Net::Jabber::Query::TAGS{'http://jabber.org/protocol/feature-neg'}); my $query = new Net::Jabber::Query($tag); # <- THIS IS THE LINE $query->SetXMLNS("http://jabber.org/protocol/feature-neg"); my $xdata = $query->NewX("jabber:x:data"); foreach my $feature (keys(%{$features})) { my $field = $xdata->AddField(type=>"list-single", var=>$feature); foreach my $value (@{$features->{$feature}}) { $field->AddOption(value=>$value); } } return $query; } My Operating System: Debian Lenny( 2.6.18-028stab070.14 x86_64 GNU/Linux) libnet-jabber: libnet-jabber-perl 2.0-3.1 Perl-Version: perl, v5.10.0 built for x86_64-linux-gnu-thread-multi Greetings Hoti


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.