Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 20606
Status: rejected
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: ROBAU [...] cpan.org
Cc:
AdminCc:

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



Creation of a POE::Component::Server::TCP object fails where the required states 'Acceptor' or 'ClientInput' has been declared within either 'InlineStates', 'ObjectStates' or 'PackageStates' rather than within the top-level arguments passed to the class constructor. For example: sub client_input {} sub create { my $self = bless {}, shift; POE::Component::Server::TCP->new( 'Port' => 11000, 'ObjectStates' => [ $self => { 'ClientInput' => 'client_input' } ] ); }
Subject: POE::Component::Server::TCP croaks when called incorrectly
POE::Component::Server::TCP->new() requires ClientInput or Acceptor as a top-level parameter rather than as an ObjectStates parameter. This is part of the class's design. Your test case fails because it uses POE::Component::Server::TCP in a way that it was not designed. In essence, you are providing improper parameters to the constructor, and the constructor is appropriately calling croak(). Please use the component properly.