Skip Menu |

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

Report information
The Basics
Id: 38773
Status: resolved
Worked: 30 min
Priority: 0/
Queue: POE-Component-IRC

People
Owner: BINGOS [...] cpan.org
Requestors: tokuhirom+cpan [...] gmail.com
Cc:
AdminCc:

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



Subject: POE::Filter::IRC::Compat->get_one should not return undef
get_one must return ARRAYREF, but POE::Filter::IRC::Compat->get_one returns undef when get invalid ctcp command. follow is a patch =) === lib/POE/Filter/IRC/Compat.pm ================================================================== --- lib/POE/Filter/IRC/Compat.pm (revision 26515) +++ lib/POE/Filter/IRC/Compat.pm (local) @@ -285,7 +285,7 @@ sub _get_ctcp { my ($self, $line) = @_; - my ($who, $type, $where, $msg) = ($line =~ /^:(\S+) +(\S+) +(\S+) +:?(.*)$/) or return; + my ($who, $type, $where, $msg) = ($line =~ /^:(\S+) +(\S+) +(\S+) +:?(.*)$/) or return []; # Is this a CTCP request or reply? $type = $type eq 'PRIVMSG' ? 'ctcp' : 'ctcpreply';
Thanks for this. I applied the spirit of your patch, as Hinrik had already refactored that code. A new version of POE::Component::IRC was released to CPAN a couple of days ago. Cheers, BinGOs