The POE::Component namespace was started as place for contributors to publish their POE-based modules without requiring coordination with the main POE distribution. The namespace predates the -X convention, otherwise you'd be reading about POEx instead.

As with many things in Perl, there is more than one way to implement component interfaces. Newer components sport OO interfaces, and some even use Moose, but older ones are solely message driven.

OBJECT ORIENTED COMPONENTS

One way to create object-oriented components is to embed a POE::Session instance within an object. This is done by creating the session during the object's constructor, setting the session's alias to something unique, and saving a copy of the alias in the object.

The alias allows object methods to pass events into the session without having to store something about the session. The POE::Kernel call() transfers execution from the caller session's context into the component's session.

Too many sessions may bog down object creation and destruction, so avoid creating them for every object.

SEE ALSO

The SEE ALSO section in POE contains a table of contents covering the entire POE distribution.

POE::Stage is a nascent project to formalize POE components, make POE::Kernel more object-oriented, and provide syntactic and semantic sugar for many common aspects of POE::Component development. It's also easier to type. Please investigate the project. Ideas and tuits are badly needed to help get the project off the ground.

TO DO

Document the customary (but not mandatory!) process of creating and publishing a component.