[Pidgin] #7426: "Use of uninitialized value in subroutine entry at (eval 2)" in perl plugin.
Pidgin
trac at pidgin.im
Fri Oct 31 11:20:20 EDT 2008
#7426: "Use of uninitialized value in subroutine entry at (eval 2)" in perl
plugin.
------------------+---------------------------------------------------------
Reporter: RudiS | Type: defect
Status: new | Component: plugins
Version: 2.5.2 | Keywords: perl
------------------+---------------------------------------------------------
Hi,
I'm testing some things with perl plugins for purple/pidgin. Here is a
simple test plugin.
{{{
use strict;
use warnings;
use Purple;
our %PLUGIN_INFO = (
perl_api_version => 2,
name => 'Test Plugin',
version => '0.1',
summary => 'Test Plugin.',
description => '',
author => '...',
url => '',
load => 'plugin_load',
unload => 'plugin_unload'
);
sub plugin_init {
return %PLUGIN_INFO;
}
sub plugin_load {
my $plugin = shift;
# Call callback signed_on_callback() when an account signed on.
Purple::Signal::connect(Purple::Connections::get_handle(),
'signed-on', $plugin, \&signed_on_callback,
'');
Purple::Debug::info('test', "plugin_load() - Loaded.\n");
}
sub plugin_unload {
my $plugin = shift;
Purple::Debug::info('test', "plugin_unload() - Unloaded.\n");
}
sub signed_on_callback {
my ($connection, $data) = @_;
my $account = Purple::Connection::get_account($connection);
my @buddies = Purple::Find::buddies($account, undef); # This is line
43.
Purple::Debug::info('abook', "signal_cb(): Finished.\n");
}
}}}
When using it with pidgin (no other plugins loaded) on Mac OS X 10.4 I get
the following error:
{{{
Use of uninitialized value in subroutine entry at (eval 2) line 43.
}}}
But the plugin (bigger in reality) works fine and pidgin doesn't crash.
If you need more information please tell me. Thanks for your help.
Simon
--
Ticket URL: <http://developer.pidgin.im/ticket/7426>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list