Skip Menu |

This queue is for tickets about the POE-Filter-IRCD CPAN distribution.

Report information
The Basics
Id: 50716
Status: resolved
Worked: 10 min
Priority: 0/
Queue: POE-Filter-IRCD

People
Owner: BINGOS [...] cpan.org
Requestors: rcaputo [...] pobox.com
Cc:
AdminCc:

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



CC: rarbox <info [...] rarbox.com>
Subject: POE::Filter::IRCD should override clone()
Date: Wed, 21 Oct 2009 12:59:46 -0400
To: bug-POE-Filter-IRCD [...] rt.cpan.org
From: Rocco Caputo <rcaputo [...] pobox.com>
POE::Filter::IRCD->new() instantiates a hashref object. The base POE::Filter's clone() method expects an ARRAYREF object. POE::Filter::IRCD should override clone() to work with POE::Component::Server::TCP. The tircd project may immediately resolve this problem on their side by using the documented ClientFilter => CLASS_NAME constructor parameter format. By specifying a class name rather than an object instance, POE::Component::Server::TCP will instantiate new objects for each client rather than call clone() on the supplied filter instance. If they are not using POE::Component::Server::TCP, then they should be aware that they can instantiate new filters for each connection rather than cloning an archetypical instance. -- Rocco Caputo - rcaputo@pobox.com On Oct 20, 2009, at 22:23, rarbox wrote: Show quoted text
> Hello, > > I tried to run tircd which makes use of POE and I get a POE::Filter > error - Not an ARRAY reference at /usr/lib/perl5/vendor_perl/5.10.0/ > POE/Filter.pm line 39. > > I made a bug report at this link http://code.google.com/p/tircd/issues/detail?id=65 > and they said the problem is with POE::Filter, so I thought I'll > ask you. > > Regards, > Byju. > >
RT-Send-CC: info [...] rarbox.com
On Wed Oct 21 13:00:13 2009, rcaputo@pobox.com wrote: Show quoted text
> POE::Filter::IRCD->new() instantiates a hashref object. The base > POE::Filter's clone() method expects an ARRAYREF object. > POE::Filter::IRCD should override clone() to work with > POE::Component::Server::TCP. > > The tircd project may immediately resolve this problem on their side > by using the documented ClientFilter => CLASS_NAME constructor > parameter format. By specifying a class name rather than an object > instance, POE::Component::Server::TCP will instantiate new objects for > each client rather than call clone() on the supplied filter instance. > > If they are not using POE::Component::Server::TCP, then they should be > aware that they can instantiate new filters for each connection rather > than cloning an archetypical instance. >
POE::Filter::IRCD does have a clone() method that does the right thing. sub clone { my $self = shift; my $nself = { }; $nself->{$_} = $self->{$_} for keys %{ $self }; $nself->{BUFFER} = [ ]; return bless $nself, ref $self; } According the changelog Hinrik added it as of version 2.34 t/01_ircd.t even tests it. Cheers.
Subject: Re: [rt.cpan.org #50716] POE::Filter::IRCD should override clone()
Date: Thu, 22 Oct 2009 23:52:22 +0530
To: bug-POE-Filter-IRCD [...] rt.cpan.org
From: rarbox <info [...] rarbox.com>
Hello, Thanks for the reply. I'll let them know about this. Regards, Byju. On 10/22/2009 02:15 AM, BINGOS via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=50716> > > On Wed Oct 21 13:00:13 2009, rcaputo@pobox.com wrote: >
>> POE::Filter::IRCD->new() instantiates a hashref object. The base >> POE::Filter's clone() method expects an ARRAYREF object. >> POE::Filter::IRCD should override clone() to work with >> POE::Component::Server::TCP. >> >> The tircd project may immediately resolve this problem on their side >> by using the documented ClientFilter => CLASS_NAME constructor >> parameter format. By specifying a class name rather than an object >> instance, POE::Component::Server::TCP will instantiate new objects for >> each client rather than call clone() on the supplied filter instance. >> >> If they are not using POE::Component::Server::TCP, then they should be >> aware that they can instantiate new filters for each connection rather >> than cloning an archetypical instance. >> >>
> > POE::Filter::IRCD does have a clone() method that does the right thing. > > sub clone { > my $self = shift; > my $nself = { }; > $nself->{$_} = $self->{$_} for keys %{ $self }; > $nself->{BUFFER} = [ ]; > return bless $nself, ref $self; > } > > According the changelog Hinrik added it as of version 2.34 > > t/01_ircd.t even tests it. > > Cheers. > > >
This appears to be resolved.