Thread: [poe-commits] poe/POE/Component/Server TCP.pm,1.28,1.29
Brought to you by:
rcaputo
From: <rc...@us...> - 2002-10-20 20:55:24
|
Update of /cvsroot/poe/poe/POE/Component/Server In directory usw-pr-cvs1:/tmp/cvs-serv32317/POE/Component/Server Modified Files: TCP.pm Log Message: Added a mandatory warning whenever a signal is handled by returning true from its event handler. POE versions since 0.20 have recommended using sig_handled() instead. Added a mandatory warning whenever a "_signal" event handler is registered. POE versions since 0.20 have recommended using sig() to register explicit handlers rather than using catch-all _signal event. Added a mandatory warning when calling sig_handled() in a "_signal" handler. This includes handling signals from "_default". Removed _signal handlers from components and tests, since they now cause warnings. For the tests which need to handle signals, we now call sig() to register those handlers. Removed _signal from the list of events which generate the "... but session foo has neither that state nor a _default state to handle it" warnings. Otherwise removing _signal handlers would trade one warning for another. Index: TCP.pm =================================================================== RCS file: /cvsroot/poe/poe/POE/Component/Server/TCP.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** TCP.pm 12 Sep 2002 02:46:25 -0000 1.28 --- TCP.pm 20 Oct 2002 20:55:21 -0000 1.29 *************** *** 157,161 **** # To quiet ASSERT_STATES. _child => sub { }, - _signal => sub { 0 }, tcp_server_got_input => sub { --- 157,160 ---- *************** *** 240,247 **** # Dummy states to prevent warnings. - _signal => sub { return 0 }, _stop => sub { return 0 }, _child => sub { }, - _signal => sub { 0 }, }, ); --- 239,244 ---- |