Skip Menu |

This queue is for tickets about the POE-Component-IRC CPAN distribution.

Report information
The Basics
Id: 79745
Status: new
Priority: 0/
Queue: POE-Component-IRC

People
Owner: Nobody in particular
Requestors: gmariusx [...] yahoo.com
Cc:
AdminCc:

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



Subject: nick_long_form dies due to a race condition
I'm using POE::Component::IRC::State. When somebody joins, their nick is added to the state, and a WHO command is issued. If you call `$irc->nick_long_form('that_guy')` before the WHO reply is received [ i.e. before the nick is synced ], `nick_long_form` will die because the user and the host are not in the state. The documentation does not say what should happen in this case, but I'd say nick_long_form should return false. The fix would be to add the following line between lines 882 and 883 of POE/Component/IRC/State.pm: return unless exists $user->{User} && exists $user->{Host}; System information: I'm using POE-Component-IRC 6.78 from the Debian repos [ package libpoe-component-irc-perl version 6.78+dfsg-1 ]. I did not test other versions. I'm using perl from the Debian repos [ package perl version 5.14.2-13 ]. `perl -v` says: This is perl 5, version 14, subversion 2 (v5.14.2) built for i486-linux-gnu-thread-multi-64int (with 62 registered patches, see perl -V for more detail) `uname -a` says: Linux ieval.ro 3.3.0 #4 Tue Jun 19 09:52:46 EEST 2012 i686 GNU/Linux