Browse files

Document "use POE" magic.

  • Loading branch information...
1 parent e17caee commit a57acdabb1bb9e26e5606f85d69e2fe68fecf653 @rcaputo committed Aug 19, 2007
Showing with 23 additions and 2 deletions.
  1. +23 −2 lib/
@@ -79,8 +79,7 @@ POE - portable multitasking and networking framework for Perl
#!/usr/bin/perl -w
use strict;
- # Use POE!
- use POE;
+ use POE; # Auto-includes POE::Kernel and POE::Session.
sub handler_start {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
@@ -220,6 +219,28 @@ By design, it's possible to implement new POE::Kernel guts by creating
another POE::Resource class. One can then expose the functionality
with a new POE::API mix-in.
+=head1 USING POE
+POE's C<import> method implements some magic to cut down on the amount
+of necessary setup.
+For starters, C<use POE> will automatically include POE::Kernel. And
+it will also include POE::Session if a session type isn't specified.
+Most programs need both of these modules, so POE gives you them for
+Modules can also be included on the C<use POE> line. The leading
+"POE::" should be omitted when using POE this way:
+ use POE qw(Component::Client::TCP).
+This is a somewhat abbreviated version of:
+ use POE;
+ use POE::Kernel;
+ use POE::Session;
+ use POE::Component::Client::TCP;
You're reading the main POE documentation. It's the general entry

0 comments on commit a57acda

Please sign in to comment.