<s>
The	O
Perl	B-Language
Object	I-Language
Environment	I-Language
or	O
POE	O
is	O
a	O
library	B-Library
of	O
Perl	B-Language
modules	B-Architecture
written	O
in	O
the	O
Perl	B-Language
programming	I-Language
language	I-Language
by	O
Rocco	O
Caputo	O
et	O
al	O
.	O
</s>
<s>
From	O
CPAN	B-Language
:	O
</s>
<s>
It	O
has	O
evolved	O
into	O
a	O
general	O
purpose	O
multitasking	O
and	O
networking	O
framework	O
,	O
encompassing	O
and	O
providing	O
a	O
consistent	O
interface	O
to	O
other	O
event	O
loops	O
such	O
as	O
Event	O
and	O
the	O
Tk	B-Application
and	O
Gtk	O
toolkits.	O
"	O
</s>
<s>
POE	O
,	O
The	O
Perl	B-Language
Object	I-Language
Environment	I-Language
can	O
be	O
thought	O
of	O
as	O
a	O
tiny	O
modular	B-Architecture
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
One	O
or	O
more	O
POE	O
programs	O
or	O
instances	O
can	O
be	O
run	O
concurrently	O
and	O
are	O
generally	O
well	O
suited	O
for	O
cooperative	B-Operating_System
multitasking	I-Operating_System
.	O
</s>
<s>
The	O
POE	O
package	O
consists	O
of	O
namespaces	O
and	O
abstractions	B-Application
that	O
guide	O
future	O
development	O
of	O
POE	O
in	O
an	O
open-ended	O
CPAN-style	B-Language
convention	O
.	O
</s>
<s>
The	O
informal	O
architecture	O
consists	O
of	O
a	O
set	O
of	O
layers	O
with	O
a	O
kernel	B-Operating_System
on	O
the	O
bottom	O
.	O
</s>
<s>
This	O
tiny	O
kernel	B-Operating_System
represents	O
the	O
events	O
layer	O
which	O
operates	O
as	O
the	O
main	O
loop	O
of	O
each	O
running	O
POE	O
instance	O
.	O
</s>
<s>
The	O
first	O
call	O
is	O
to	O
the	O
"	O
event	B-Application
dispatcher	I-Application
"	O
-	O
POE::Kernel	O
.	O
</s>
<s>
The	O
POE::Kernel	O
namespace	O
contains	O
a	O
suite	O
of	O
functions	O
which	O
are	O
plugged	O
into	O
the	O
kernel	B-Operating_System
itself	O
.	O
</s>
<s>
These	O
loop	O
abstractions	B-Application
are	O
designed	O
after	O
POE	O
's	O
standardized	O
event	O
loop	O
bridge	O
interface	O
-	O
POE::Loop	O
.	O
</s>
<s>
These	O
can	O
be	O
mixed	O
and	O
matched	O
as	O
needed	O
to	O
provide	O
runtime	O
services	O
and	O
a	O
lean	O
facility	O
for	O
interprocess	B-Operating_System
communication	I-Operating_System
.	O
</s>
<s>
Also	O
available	O
are	O
POE::Loop::Tk	O
and	O
POE::Loop::Gtk	O
which	O
offer	O
hooks	O
into	O
other	O
loop	O
bridges	O
in	O
the	O
external	O
environment	O
.	O
</s>
<s>
If	O
that	O
is	O
n't	O
enough	O
,	O
the	O
POE::Loop	O
kernel	B-Operating_System
abstraction	B-Application
provides	O
reusable	O
signal	O
callbacks	O
,	O
time	O
or	O
alarm	O
callbacks	O
,	O
and	O
filehandle	B-Application
activity	O
callbacks	O
as	O
well	O
as	O
administrative	O
functions	O
such	O
as	O
initializing	O
,	O
executing	O
,	O
and	O
finalizing	O
event	O
loops	O
.	O
</s>
<s>
NOTE	O
:	O
As	O
the	O
Perl	B-Language
tradition	O
mandates	O
,	O
POE	O
is	O
also	O
a	O
moving	O
target	O
.	O
</s>
<s>
Always	O
check	O
CPAN	B-Language
to	O
see	O
what	O
new	O
goodies	O
the	O
community	O
has	O
placed	O
in	O
the	O
archive	O
.	O
</s>
<s>
The	O
Running	O
Kernel	B-Operating_System
operates	O
through	O
primordial	O
finite-state	B-Architecture
machines	I-Architecture
constructed	O
from	O
another	O
set	O
of	O
abstractions	B-Application
ruled	O
by	O
the	O
POE::Session	O
architecture	O
.	O
</s>
<s>
A	O
POE::Session	O
is	O
almost	O
trivially	O
defined	O
as	O
a	O
map	O
of	O
events	O
to	O
the	O
functions	O
,	O
class	O
methods	B-Language
,	O
and/or	O
object	O
methods	B-Language
that	O
handle	O
them	O
.	O
</s>
<s>
A	O
more	O
featureful	O
event	O
handler	O
is	O
a	O
POE::Session	O
subclass	O
called	O
POE::NFA	O
-	O
an	O
event-driven	O
Nondeterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
(	O
a	O
smarter	O
finite	B-Architecture
state	I-Architecture
machine	I-Architecture
)	O
.	O
</s>
<s>
This	O
state	B-Architecture
machine	I-Architecture
acts	O
to	O
encapsulate	O
a	O
wide	O
range	O
of	O
generic	O
event	B-Application
driven	I-Application
threads	B-Operating_System
allowing	O
much	O
tighter	O
tracking	O
along	O
the	O
execution	O
path	O
than	O
the	O
relatively	O
informal	O
POE::Session	O
.	O
</s>
<s>
The	O
Kernel	B-Operating_System
's	O
next	O
requirement	O
is	O
for	O
Input-Output	O
handlers	O
that	O
exist	O
in	O
a	O
single	O
I/O	O
layer	O
called	O
Wheels	O
.	O
</s>
<s>
Wheels	O
,	O
like	O
Sessions	O
and	O
Loops	O
are	O
built	O
from	O
a	O
uniform	O
set	O
of	O
abstractions	B-Application
-	O
POE::Wheel	O
-	O
that	O
sit	O
on	O
top	O
of	O
the	O
Kernel	B-Operating_System
.	O
</s>
<s>
POE::Wheel::Curses	O
-	O
A	O
handler	O
for	O
non-blocking	O
input	O
from	O
the	O
Curses	B-Device
text	O
interface	O
library	B-Library
.	O
</s>
<s>
CPAN	B-Language
components	O
such	O
as	O
Curses::UI::POE	O
and	O
Term::Visual	O
build	O
upon	O
it	O
.	O
</s>
<s>
POE::Wheel::ReadLine	O
-	O
A	O
non-blocking	O
,	O
event	B-Application
driven	I-Application
analogue	O
to	O
Term::ReadLine	O
.	O
</s>
<s>
POE::Wheel::ReadWrite	O
-	O
A	O
high-performance	O
NBIO	B-Architecture
file	O
handler	O
for	O
POE	O
that	O
uses	O
POE	O
's	O
drivers	B-Application
and	O
filters	O
to	O
perform	O
buffered	O
read	O
and	O
write	O
on	O
filehandles	B-Application
which	O
draws	O
on	O
the	O
next	O
layer	O
-	O
POE	O
's	O
own	O
little	O
file	O
system	O
.	O
</s>
<s>
Drivers	B-Application
do	O
the	O
actual	O
work	O
of	O
reading	O
and	O
writing	O
filehandles	B-Application
.	O
</s>
<s>
They	O
are	O
built	O
according	O
to	O
the	O
less	O
abstract	O
definitions	O
contained	O
in	O
the	O
POE::Driver	O
module	B-Architecture
.	O
</s>
<s>
The	O
main	O
driver	O
implemented	O
at	O
the	O
time	O
of	O
this	O
writing	O
is	O
POE::Driver::SysRW	O
-	O
a	O
universal	O
filehandle	B-Application
reader/writer	O
designed	O
especially	O
for	O
POE::Wheel::ReadWrite	O
.	O
</s>
<s>
The	O
next	O
layer	O
,	O
built	O
from	O
POE::Filter	O
and	O
probably	O
the	O
focus	O
of	O
most	O
Perl	B-Language
Obfuscation	O
Efficianados	O
(	O
see	O
POE	O
#POE	O
Humor	O
below	O
)	O
,	O
is	O
the	O
POE::Filter	O
set	O
:	O
</s>
<s>
POE::Filter::Block	O
-	O
parses	O
input	O
as	O
fixed-length	O
blocks	O
.	O
</s>
<s>
POE::Filter::HTTPD	O
-	O
parses	O
input	O
as	O
HTTP	O
requests	O
and	O
translates	O
them	O
into	O
HTTP::Request	O
objects	O
.	O
</s>
<s>
POE::Filter::Line	O
-	O
parses	O
incoming	O
streams	O
into	O
lines	O
and	O
turns	O
outgoing	O
lines	O
into	O
streams	O
.	O
</s>
<s>
POE::Filter::Reference	O
-	O
used	O
to	O
send	O
Perl	B-Language
structures	O
between	O
POE	O
programs	O
or	O
between	O
POE	O
and	O
other	O
Perl	B-Language
programs	O
.	O
</s>
<s>
On	O
the	O
input	O
side	O
,	O
frozen	O
data	O
(	O
via	O
Storable	O
,	O
FreezeThaw	O
,	O
YAML	O
,	O
or	O
some	O
other	O
serialization	O
mechanism	O
)	O
is	O
thawed	O
into	O
Perl	B-Language
data	O
structures	O
.	O
</s>
<s>
On	O
output	O
,	O
references	O
given	O
to	O
the	O
filter	B-Application
are	O
frozen	O
.	O
</s>
<s>
POE::Filter::Stream	O
-	O
does	O
nothing	O
.	O
</s>
<s>
Several	O
larger	O
packages	B-Architecture
have	O
been	O
written	O
in	O
POE	O
according	O
to	O
the	O
POE::Component	O
documentation	O
.	O
</s>
<s>
These	O
are	O
event-driven	O
modules	B-Architecture
,	O
many	O
of	O
which	O
act	O
as	O
little	O
daemons	B-Operating_System
that	O
provide	O
services	O
to	O
larger	O
packages	B-Architecture
to	O
which	O
they	O
belong	O
.	O
</s>
<s>
Some	O
of	O
them	O
facilitate	O
higher-level	O
communications	O
between	O
modules	B-Architecture
,	O
especially	O
stand-alone	O
applications	O
that	O
need	O
to	O
remain	O
independent	O
from	O
the	O
main	O
distribution	O
of	O
Perl	B-Language
.	O
</s>
<s>
"	O
POE	O
Components	O
tend	O
to	O
be	O
highly	O
reusable	B-Library
libraries	I-Library
that	O
handle	O
tedious	O
tasks	O
,	O
</s>
<s>
This	O
should	O
be	O
true	O
for	O
any	O
library	B-Library
,	O
though.	O
"	O
</s>
<s>
The	O
Acme::POE::Knee	O
module	B-Architecture
on	O
the	O
CPAN	B-Language
.	O
</s>
