Revision: 2137
http://svn.sourceforge.net/poe/?rev=2137&view=rev
Author: rcaputo
Date: 2006-09-23 09:08:30 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
Document why this module refuses to run on MSWin32. At least two
people have expressed confusion and concern about this so far.
Modified Paths:
--------------
trunk/poe/lib/POE/Wheel/ReadLine.pm
Modified: trunk/poe/lib/POE/Wheel/ReadLine.pm
===================================================================
--- trunk/poe/lib/POE/Wheel/ReadLine.pm 2006-09-19 22:00:21 UTC (rev 2136)
+++ trunk/poe/lib/POE/Wheel/ReadLine.pm 2006-09-23 16:08:30 UTC (rev 2137)
@@ -3388,6 +3388,22 @@
totally get acquainted with all the other cool stuff you can do with
.inputrc files.
+Q: Why doesn't POE::Wheel::ReadLine work on Windows? Term::ReadLine
+does.
+
+A: POE::Wheel::ReadLine requires select(), because that's what POE
+uses by default to detect keystrokes without blocking. About half the
+flavors of Perl on Windows implement select() in terms of the same
+function in the WinSock library, which limits select() to working only
+with sockets. Your console isn't a socket, so select() doesn't work
+with your version of Perl on Windows.
+
+Really good workarounds are possible but don't exist as of this
+writing. They involve writing a special POE::Loop for Windows that
+either uses a Win32-specific module for better multiplexing, that
+polls for input, or that uses blocking I/O watchers in separate
+threads.
+
=head1 AUTHORS & COPYRIGHTS
Rocco Caputo - Original author.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Revision: 2125
http://svn.sourceforge.net/poe/?rev=2125&view=rev
Author: immute
Date: 2006-09-13 17:45:24 -0700 (Wed, 13 Sep 2006)
Log Message:
-----------
Fixed POE::Kernel::TRACE_STATISTICS documentation bug reported by joel.
Modified Paths:
--------------
trunk/poe/lib/POE/Kernel.pm
Modified: trunk/poe/lib/POE/Kernel.pm
===================================================================
--- trunk/poe/lib/POE/Kernel.pm 2006-09-12 15:40:22 UTC (rev 2124)
+++ trunk/poe/lib/POE/Kernel.pm 2006-09-14 00:45:24 UTC (rev 2125)
@@ -4035,9 +4035,9 @@
displayed just before run() returns, and the data can be retrieved at
any time using stat_getdata().
-stat_getdata() returns a hashref of various statistics and their
-values. The statistics are calculated using a sliding window and vary
-over time as a program runs.
+stat_getdata() returns a hash of various statistics and their values
+The statistics are calculated using a sliding window and vary over
+time as a program runs.
=item TRACE_PROFILE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Revision: 2122
http://svn.sourceforge.net/poe/?rev=2122&view=rev
Author: lotr
Date: 2006-09-08 13:28:16 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
document instantiate and try_alloc, and thus remove them from the
exception list in tests/10_units/01_pod/02_pod_coverage.t
Modified Paths:
--------------
trunk/poe/lib/POE/Session.pm
trunk/poe/tests/10_units/01_pod/02_pod_coverage.t
Modified: trunk/poe/lib/POE/Session.pm
===================================================================
--- trunk/poe/lib/POE/Session.pm 2006-09-08 16:23:04 UTC (rev 2121)
+++ trunk/poe/lib/POE/Session.pm 2006-09-08 20:28:16 UTC (rev 2122)
@@ -1237,6 +1237,51 @@
=back
+=head2 Subclassing
+
+There are a few methods available to help people trying to subclass
+L<POE::Session>.
+
+=over 2
+
+=item instantiate
+
+When you want to subclass L<POE::Session>, you may want to allow for extra
+parameters to be passed to the constructor, and maybe store some extra data
+in the object structure.
+
+The easiest way to do this is by overriding the instantiate method, which
+creates an empty object for you, and is passed a reference to the hash of
+parameters passed to create().
+
+When overriding it, be sure to first call the parent classes instantiate
+method, so you have a reference to the empty object. Then you should remove
+all the extra parameters from the hash of parameters you get passed, so
+L<POE::Session>'s create() doesn't croak when it encounters parameters it
+doesn't know.
+
+Also, don't forget to return the reference to the object (optionally already
+filled with your data; try to keep out of the places where L<POE::Session>
+stores its stuff, or it'll get overwritten)
+
+=item try_alloc
+
+At the end of L<POE::Session>'s create() method, try_alloc() is called.
+This tells the POE Kernel to allocate an actual session with the object
+just created.
+
+If you want to fiddle with the object the constructor just created, to
+modify parameters that already exist in the base L<POE::Session> class,
+based on your extra parameters for example, this is the place to do it.
+override the try_alloc() method, do your evil, and end with calling
+the parent try_alloc(), returning its return value.
+
+try_alloc() is passed the arguments for the _start state (the contents of
+the listref passed in the 'args' parameter for create()). Make sure to pass
+this on to the parent method (after maybe fiddling with that too).
+
+=back
+
=head1 PREDEFINED EVENT FIELDS
Each session maintains its unique runtime context. Sessions pass
@@ -1717,7 +1762,6 @@
=back
-
=head1 SEE ALSO
POE::Kernel.
Modified: trunk/poe/tests/10_units/01_pod/02_pod_coverage.t
===================================================================
--- trunk/poe/tests/10_units/01_pod/02_pod_coverage.t 2006-09-08 16:23:04 UTC (rev 2121)
+++ trunk/poe/tests/10_units/01_pod/02_pod_coverage.t 2006-09-08 20:28:16 UTC (rev 2122)
@@ -46,8 +46,6 @@
? ( )
: (
'register_state', # Should become _register_state.
- 'instantiate', # Public or private?
- 'try_alloc', # Public or private?
)
)
],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.