diff -Nru libpoe-perl-1.3560/CHANGES libpoe-perl-1.3580/CHANGES --- libpoe-perl-1.3560/CHANGES 2013-08-20 21:27:30.000000000 +0000 +++ libpoe-perl-1.3580/CHANGES 2013-12-08 08:12:03.000000000 +0000 @@ -2,6 +2,302 @@ 9999-99-99 99:99:99 +0000 HEAD ============================== + commit 189d17148acd03df579dd12d043486d97db0c7cf + Author: Rocco Caputo + Date: Sun Dec 8 03:10:49 2013 -0500 + + Bump version for release. + + commit 2e2f94348f7645091e4160cc103d5a4d77dce6d9 + Author: Rocco Caputo + Date: Sun Dec 8 03:08:56 2013 -0500 + + Rethrow exceptions that occur during call(). + + The previous exceptions revamp ate exceptions that occurred during + call(). Chris Williams spotted this happening in tests for + POE::Component::Client::DNS. + +================================ +2013-12-07 02:42:06 -0500 v1_357 +================================ + + commit 7f2c8d2f932cc2a260bcaecf2a455f844649334b + Author: Rocco Caputo + Date: Sat Dec 7 02:42:06 2013 -0500 + + Bump version for release. + + commit a34a625af7c96806ab131a36332a91d554159774 + Merge: f69cf46 ee6d097 + Author: Rocco Caputo + Date: Tue Nov 26 09:52:31 2013 -0500 + + Merge branch 'master' of gitorious.org:poe/poe + + commit f69cf46cccf85e218dd317c0278ee5b69c90fc21 + Merge: ebc911e 8005d23 + Author: Rocco Caputo + Date: Tue Nov 26 06:30:51 2013 -0800 + + Merge pull request #16 from dsteinbrunner/patch-1 + + typo fixes + + commit ebc911ef3d368e19e77cf16a6284ce7d57cfe713 + Merge: d3cb2fb af5deb2 + Author: Rocco Caputo + Date: Tue Nov 26 05:57:07 2013 -0800 + + Merge pull request #15 from + nkukard/tcp-server-component-stopped-event + + Added support for Stopped callback in TCP server. + + commit ee6d09745f2a37ece85a170df195a7a52c3c8ba5 + Author: Rocco Caputo + Date: Sun Oct 20 13:34:18 2013 -0400 + + [rt.cpan.org 89627] Documentation typo fixes. + + Apply a patch from CPAN user ID DAM, and then some. Thanks! + + commit d3cb2fbfb53799ab22754b900fc47af703758910 + Author: Rocco Caputo + Date: Sun Oct 6 16:58:28 2013 -0400 + + Fix a "Kernel has child processes" warning even when it doesn't. + + Michel Schrameck reported that the above warning was coming from a + very simple, obviously not fork()ing test program. I was able to + reproduce the problem with the test case when USE_SIGCHLD was turned + off. This fix changes the way first polling of SIGCHLD happens. It + passes all known tests, but it may negatively affect older programs. + Please report any problems. + + commit 8005d23aa5380f7359315417e097b543058d583c + Author: David Steinbrunner + Date: Mon Sep 9 07:39:03 2013 -0400 + + typo fixes + + commit 3418f32ee2922df476b9865a4de6fe540a85ac67 + Author: David Steinbrunner + Date: Mon Sep 9 07:34:39 2013 -0400 + + typo fix + + commit 3cc2f92488f9eacea3266b300f3abd5c9bb53df6 + Author: David Steinbrunner + Date: Mon Sep 9 07:33:22 2013 -0400 + + typo fix + + commit 3d96b8c4d20ede2acf3b67ec1398eff72e921d26 + Author: David Steinbrunner + Date: Mon Sep 9 07:32:18 2013 -0400 + + typo fix + + commit 53f4c1eebd795adc621e15a61c81e6b1b6204e45 + Author: David Steinbrunner + Date: Mon Sep 9 07:29:36 2013 -0400 + + typo fix + + commit 56c2e2855ed01b792bc1dcd8691fc34a07e0dd83 + Author: David Steinbrunner + Date: Mon Sep 9 07:28:55 2013 -0400 + + typo fix + + commit bd94d7e5dc70b0701b56c3761659369e73a13294 + Author: David Steinbrunner + Date: Mon Sep 9 07:28:07 2013 -0400 + + typo fixes + + commit 1ad2fbe711a4e99b56b76d12ebfc75496c328b1a + Author: David Steinbrunner + Date: Mon Sep 9 07:22:54 2013 -0400 + + typo fix + + commit 033a0bd4c6408f3fddf851364b681a8993409481 + Author: David Steinbrunner + Date: Mon Sep 9 07:22:29 2013 -0400 + + typo fix + + commit fd911b1ca90c99fa1e9ad2f8ef1cf3c2676a07fd + Author: David Steinbrunner + Date: Mon Sep 9 07:22:01 2013 -0400 + + typo fix + + commit 87263f4f0909d11823f17ab2bddbb931b9c80142 + Author: David Steinbrunner + Date: Mon Sep 9 07:21:29 2013 -0400 + + typo fix + + commit be10d35944696a2ed0edf1ad33491d87e5671648 + Author: David Steinbrunner + Date: Mon Sep 9 07:20:51 2013 -0400 + + typo fix + + commit bb9004867045a1e25a6aa935d859c2e60578b222 + Author: David Steinbrunner + Date: Mon Sep 9 07:19:56 2013 -0400 + + typo fix + + commit 1e37402ef70fc416ba5bc0f41964158c853fbeec + Author: David Steinbrunner + Date: Mon Sep 9 07:16:30 2013 -0400 + + typo fix + + commit 65499de54269592cd0b7515ed23c1b57eb321aac + Author: David Steinbrunner + Date: Mon Sep 9 07:15:10 2013 -0400 + + typo fix + + commit 42203296e67176efbff11db438cdd0f06172f1fa + Author: David Steinbrunner + Date: Mon Sep 9 07:14:17 2013 -0400 + + typo fix + + commit 620b3ba9f8f980252ad535399a575f4f608d0914 + Author: David Steinbrunner + Date: Mon Sep 9 07:12:49 2013 -0400 + + typo fixes + + commit 3cde88f27957015cbe48cee99c92d42f31d5d052 + Author: David Steinbrunner + Date: Mon Sep 9 07:10:36 2013 -0400 + + typo fix + + commit a6273522e272aaeb8517d036bc552894bb5abe25 + Author: David Steinbrunner + Date: Mon Sep 9 07:09:29 2013 -0400 + + typo fixes + + commit af5deb2720f60351a09c9c004a0e4263707f9a48 + Author: Nigel Kukard + Date: Sun Sep 8 16:50:11 2013 +0200 + + Added support for Stopped callback in TCP server + + commit 52487325a316b2bcc945f0a1f344556b58760ef3 + Author: Rocco Caputo + Date: Thu Sep 5 18:52:13 2013 -0400 + + !!! CATCH_EXCEPTIONS revamp. + + May be slightly backwards incompatible. I expect more good to come + from it than harm. + + POE should hide error messages less often. Its usage of eval() and + propagation of exceptions have been simplified somewhat. + + !!! This change reverses POE's stance on user-defined $SIG{__DIE__} + handlers. Now they are honored inside event handlers. Code that does + this is expected to know what it's doing. Perl's global special + variables, including %SIG, have spooky action at a distance. + + Modifying $SIG{__DIE__} locally shouldn't cause any problems. The + original value will be restored at the end of the local scope. + + I changed this because reasons: + + 1. Silent side effects suck. Previously, POE would silently overrule + global changes to $SIG{__DIE__}. This change makes things a little + more comprehensible. + + 2. $SIG{__DIE__} handlers are very useful for logging and debugging. + Setting them should be permissible. + + 3. If CATCH_EXCEPTIONS is on, and $SIG{__DIE__} is redefined in an + event handler, the programmer is told about the potential side + effects. This is an experimental warning and is subject to change + more than most things. + + 4. Error messages were being hidden at work, and it was confounding + development. + + commit bae8c6e8dd4184ec0ad5dec9d41da4229a5831c5 + Author: Rocco Caputo + Date: Thu Sep 5 18:21:47 2013 -0400 + + Switch some signal regression tests from ok() to is() for more + detailed failures. + + commit 1779588cc430e911b2b657fcf2e6ae89008f0ef4 + Author: Rocco Caputo + Date: Thu Sep 5 15:23:52 2013 -0400 + + Remove some redundant C. + + commit 254205621c086e25cdc8c22994703a5f0ac4bada + Author: Rocco Caputo + Date: Thu Sep 5 14:40:20 2013 -0400 + + Refactor _dispatch_event(), extracting _dispatch_signal_event(). + + _dispatch_event() was rather large, and there was an isolated section + for recursive signal dispatch. That has been extracted into its own + method, _dispatch_signal_event() so the basic event dispatcher can be + smaller and more focused. This should make it easier to improve + exception handling in _dispatch_event(). + + commit e2ea58bb392c2268b7fdca0bb208e16c6f47d465 + Author: Rocco Caputo + Date: Thu Sep 5 14:38:20 2013 -0400 + + Make _trap(), _warn(), etc. a little more consistent. + + Put the process ID at the start of every line of error messages, + rather than just the beginning of the first line. We deal with + subprocesses a lot at work, and this helps tease apart interleaved + messages. + + commit b81728e7d1b76be619c34c0f2940dcbbd44970b8 + Author: Rocco Caputo + Date: Thu Sep 5 14:36:12 2013 -0400 + + Fail better if asked to serialize a non-reference. + + A component was trying to serialize undef() rather than a reference + to something undefined. It was causing failure attributed to this + filter, rather than the user. Now there's a stack trace to help + spread the blame. + + commit eeadb7caf72f510e44ec445261144a7b33dd8749 + Author: Rocco Caputo + Date: Tue Aug 27 20:47:56 2013 -0400 + + Add David Webb's regression test to the MANIFEST. + + commit bf55543ef0465fa57b8752970ef499c3640acb30 + Author: David Webb + Date: Mon Aug 26 11:26:11 2013 -0500 + + Fix read bug in select based polling loop + + FollowTail does not trigger multiple input events when multiple lines + are written to the followed file at the same time. + +================================ +2013-08-20 16:36:06 -0400 v1_356 +================================ + commit 35e779316e1de7293401c57f6e9652e66cab28c6 Author: Rocco Caputo Date: Tue Aug 20 16:36:06 2013 -0400 diff -Nru libpoe-perl-1.3560/MANIFEST libpoe-perl-1.3580/MANIFEST --- libpoe-perl-1.3560/MANIFEST 2013-08-20 21:27:25.000000000 +0000 +++ libpoe-perl-1.3580/MANIFEST 2013-12-08 08:12:00.000000000 +0000 @@ -150,6 +150,7 @@ t/90_regression/leolo-sig-die.t t/90_regression/meh-startstop-return.t t/90_regression/neyuki_detach.t +t/90_regression/pipe-followtail.t t/90_regression/prumike-win32-stat.t t/90_regression/rt14444-arg1.t t/90_regression/rt1648-tied-stderr.t diff -Nru libpoe-perl-1.3560/META.json libpoe-perl-1.3580/META.json --- libpoe-perl-1.3560/META.json 2013-08-20 21:27:24.000000000 +0000 +++ libpoe-perl-1.3580/META.json 2013-12-08 08:12:00.000000000 +0000 @@ -4,7 +4,7 @@ "Rocco Caputo " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140", + "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.132830", "license" : [ "perl_5" ], @@ -60,5 +60,5 @@ "url" : "https://github.com/rcaputo/poe" } }, - "version" : "1.356" + "version" : "1.358" } diff -Nru libpoe-perl-1.3560/META.yml libpoe-perl-1.3580/META.yml --- libpoe-perl-1.3560/META.yml 2013-08-20 21:27:24.000000000 +0000 +++ libpoe-perl-1.3580/META.yml 2013-12-08 08:12:00.000000000 +0000 @@ -7,7 +7,7 @@ configure_requires: POE::Test::Loops: 1.352 dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.132140' +generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.132830' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -37,4 +37,4 @@ homepage: http://poe.perl.org/ license: http://dev.perl.org/licenses/ repository: https://github.com/rcaputo/poe -version: 1.356 +version: 1.358 diff -Nru libpoe-perl-1.3560/README libpoe-perl-1.3580/README --- libpoe-perl-1.3560/README 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/README 2013-12-08 08:10:35.000000000 +0000 @@ -1,4 +1,4 @@ -Version 1.356 +Version 1.358 -------------------- Detailed Information diff -Nru libpoe-perl-1.3560/debian/changelog libpoe-perl-1.3580/debian/changelog --- libpoe-perl-1.3560/debian/changelog 2013-11-02 12:28:06.000000000 +0000 +++ libpoe-perl-1.3580/debian/changelog 2013-12-09 22:43:03.000000000 +0000 @@ -1,3 +1,10 @@ +libpoe-perl (2:1.3580-1) unstable; urgency=low + + * Import Upstream version 1.3580 + * Drop pod-spelling.patch, applied upstream + + -- Florian Schlichting Mon, 09 Dec 2013 23:41:08 +0100 + libpoe-perl (2:1.3560-2) unstable; urgency=low * Add missing run-time dependency on libio-pipely-perl diff -Nru libpoe-perl-1.3560/debian/patches/pod-spelling.patch libpoe-perl-1.3580/debian/patches/pod-spelling.patch --- libpoe-perl-1.3560/debian/patches/pod-spelling.patch 2013-10-24 20:10:45.000000000 +0000 +++ libpoe-perl-1.3580/debian/patches/pod-spelling.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: POD spelling mistake in POE::Resource::Clock - seperate -> separate -Author: Damyan Ivanov -Bug: https://rt.cpan.org/Ticket/Display.html?id=89627 - ---- a/lib/POE/Resource/Clock.pm -+++ b/lib/POE/Resource/Clock.pm -@@ -321,7 +321,7 @@ clock is used to comunicate the time wit - - There are 3 possible clock sources in order of preference: - L, L and L. Only --C has a seperate monotonic and wall clock; the other two use the -+C has a separate monotonic and wall clock; the other two use the - same source for both clocks. - - Clock selection and behaviour is controled with the following: diff -Nru libpoe-perl-1.3560/debian/patches/series libpoe-perl-1.3580/debian/patches/series --- libpoe-perl-1.3560/debian/patches/series 2013-10-24 20:10:45.000000000 +0000 +++ libpoe-perl-1.3580/debian/patches/series 2013-12-09 22:43:03.000000000 +0000 @@ -1,3 +1,2 @@ makefile_dont_use_defaults.patch honour_no_network_option.patch -pod-spelling.patch diff -Nru libpoe-perl-1.3560/lib/POE/Component/Client/TCP.pm libpoe-perl-1.3580/lib/POE/Component/Client/TCP.pm --- libpoe-perl-1.3560/lib/POE/Component/Client/TCP.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Component/Client/TCP.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(carp croak); use Errno qw(ETIMEDOUT ECONNRESET); @@ -439,7 +439,7 @@ =head4 ObjectStates -If C is specified, it must holde an arrayref of objects +If C is specified, it must hold an arrayref of objects and the events they will handle. The arrayref must follow the syntax for POE::Session->create()'s object_states parameter. diff -Nru libpoe-perl-1.3560/lib/POE/Component/Server/TCP.pm libpoe-perl-1.3580/lib/POE/Component/Server/TCP.pm --- libpoe-perl-1.3560/lib/POE/Component/Server/TCP.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Component/Server/TCP.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(carp croak); use Socket qw(INADDR_ANY inet_ntoa inet_aton AF_INET AF_UNIX PF_UNIX); @@ -116,6 +116,7 @@ my $session_type = delete $param{SessionType}; my $session_params = delete $param{SessionParams}; my $server_started = delete $param{Started}; + my $server_stopped = delete $param{Stopped}; my $listener_args = delete $param{ListenerArgs}; $listener_args = [] unless defined $listener_args; @@ -482,7 +483,7 @@ # We accepted a connection. Do something with it. tcp_server_got_connection => $accept_callback, - # conncurrency on close. + # concurrency on close. disconnected => sub { $_[HEAP]->{connections}--; DEBUG and warn( @@ -541,6 +542,7 @@ # Dummy states to prevent warnings. _stop => sub { DEBUG and warn "$$: $_[HEAP]->{alias} _stop"; + $server_stopped and $server_stopped->(@_); undef($accept_session_id); return 0; }, @@ -726,6 +728,10 @@ constructor parameter. The other parameters are standard for POE::Session's _start handlers. +The component's C callback is invoked at the beginning of the +master session's _stop routine. The parameters are standard for +POE::Session's _stop handlers. + The component's C callback is invoked when the server has a problem listening for connections. C may also be called if the component's default acceptor has trouble accepting a connection. @@ -977,8 +983,7 @@ A default error handler will be provided if Error is omitted. The default handler will log the error to STDERR and shut down the server. -Active connections will be permitted to to complete their -transactions. +Active connections will be permitted to complete their transactions. Error => sub { my ($syscall_name, $err_num, $err_str) = @_[ARG0..ARG2]; @@ -1009,7 +1014,8 @@ If POE::Kernel::ASSERT_USAGE is enabled, the constructor will croak() if it detects a state that it uses internally. For example, please use the "Started" -callback if you want to specify your own "_start" event. +and "Stopped" callbacks if you want to specify your own "_start" and "_stop" +events respectively. =head4 ObjectStates @@ -1023,7 +1029,8 @@ If POE::Kernel::ASSERT_USAGE is enabled, the constructor will croak() if it detects a state that it uses internally. For example, please use the "Started" -callback if you want to specify your own "_start" event. +and "Stopped" callbacks if you want to specify your own "_start" and "_stop" +events respectively. =head4 PackageStates @@ -1038,7 +1045,8 @@ If POE::Kernel::ASSERT_USAGE is enabled, the constructor will croak() if it detects a state that it uses internally. For example, please use the "Started" -callback if you want to specify your own "_start" event. +and "Stopped" callbacks if you want to specify your own "_start" and "_stop" +events respectively. =head4 Port @@ -1057,10 +1065,17 @@ fully started. The callback's parameters are the usual for a session's _start handler. +=head4 Stopped + +C sets an optional callback that will be invoked within the +main server session's context. It notifies the server that it has +fully stopped. The callback's parameters are the usual for a +session's _stop handler. + =head4 ListenerArgs C is passed to the listener session as the C parameter. In -other words, it must be an arrayref, and the values are are passed into the +other words, it must be an arrayref, and the values are passed into the C handler as ARG0, ARG1, etc. =head3 Connection Session Configuration diff -Nru libpoe-perl-1.3560/lib/POE/Component.pm libpoe-perl-1.3580/lib/POE/Component.pm --- libpoe-perl-1.3560/lib/POE/Component.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Component.pm 2013-12-08 08:10:35.000000000 +0000 @@ -5,7 +5,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) 1; diff -Nru libpoe-perl-1.3560/lib/POE/Driver/SysRW.pm libpoe-perl-1.3580/lib/POE/Driver/SysRW.pm --- libpoe-perl-1.3560/lib/POE/Driver/SysRW.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Driver/SysRW.pm 2013-12-08 08:10:35.000000000 +0000 @@ -7,7 +7,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Errno qw(EAGAIN EWOULDBLOCK); use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Driver.pm libpoe-perl-1.3580/lib/POE/Driver.pm --- libpoe-perl-1.3560/lib/POE/Driver.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Driver.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Block.pm libpoe-perl-1.3580/lib/POE/Filter/Block.pm --- libpoe-perl-1.3560/lib/POE/Filter/Block.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Block.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Grep.pm libpoe-perl-1.3580/lib/POE/Filter/Grep.pm --- libpoe-perl-1.3560/lib/POE/Filter/Grep.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Grep.pm 2013-12-08 08:10:35.000000000 +0000 @@ -6,7 +6,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); use Carp qw(croak carp); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/HTTPD.pm libpoe-perl-1.3580/lib/POE/Filter/HTTPD.pm --- libpoe-perl-1.3560/lib/POE/Filter/HTTPD.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/HTTPD.pm 2013-12-08 08:10:35.000000000 +0000 @@ -13,14 +13,14 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); sub BUFFER () { 0 } # raw data buffer to build requests sub STATE () { 1 } # built a full request sub REQUEST () { 2 } # partial request being built -sub CLIENT_PROTO () { 3 } # client protoco version requested +sub CLIENT_PROTO () { 3 } # client protocol version requested sub CONTENT_LEN () { 4 } # expected content length sub CONTENT_ADDED () { 5 } # amount of content added to request diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Line.pm libpoe-perl-1.3580/lib/POE/Filter/Line.pm --- libpoe-perl-1.3560/lib/POE/Filter/Line.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Line.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); use Carp qw(carp croak); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Map.pm libpoe-perl-1.3580/lib/POE/Filter/Map.pm --- libpoe-perl-1.3560/lib/POE/Filter/Map.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Map.pm 2013-12-08 08:10:35.000000000 +0000 @@ -6,7 +6,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); use Carp qw(croak carp); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/RecordBlock.pm libpoe-perl-1.3580/lib/POE/Filter/RecordBlock.pm --- libpoe-perl-1.3560/lib/POE/Filter/RecordBlock.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/RecordBlock.pm 2013-12-08 08:10:35.000000000 +0000 @@ -6,7 +6,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Reference.pm libpoe-perl-1.3580/lib/POE/Filter/Reference.pm --- libpoe-perl-1.3560/lib/POE/Filter/Reference.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Reference.pm 2013-12-08 08:10:35.000000000 +0000 @@ -7,10 +7,10 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); -use Carp qw(carp croak); +use Carp qw(carp croak confess); sub BUFFER () { 0 } sub FREEZE () { 1 } @@ -215,6 +215,7 @@ BEGIN { eval { require bytes } and bytes->import; } my @raw = map { + confess "Choking on a non-reference ($_)" unless ref(); my $frozen = $self->[FREEZE]->($_); $frozen = compress($frozen) if $self->[COMPRESS]; length($frozen) . "\0" . $frozen; diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Stackable.pm libpoe-perl-1.3580/lib/POE/Filter/Stackable.pm --- libpoe-perl-1.3560/lib/POE/Filter/Stackable.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Stackable.pm 2013-12-08 08:10:35.000000000 +0000 @@ -12,7 +12,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Filter/Stream.pm libpoe-perl-1.3580/lib/POE/Filter/Stream.pm --- libpoe-perl-1.3560/lib/POE/Filter/Stream.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter/Stream.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ use POE::Filter; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Filter); #------------------------------------------------------------------------------ diff -Nru libpoe-perl-1.3560/lib/POE/Filter.pm libpoe-perl-1.3580/lib/POE/Filter.pm --- libpoe-perl-1.3560/lib/POE/Filter.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Filter.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Kernel.pm libpoe-perl-1.3580/lib/POE/Kernel.pm --- libpoe-perl-1.3560/lib/POE/Kernel.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Kernel.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use POE::Resource::Clock qw( monotime sleep mono2wall wall2mono walltime time ); @@ -95,69 +95,67 @@ } BEGIN { - # Set up a "constant" sub that lets the user deactivate - # automatic exception handling - { no strict 'refs'; - unless (defined &CATCH_EXCEPTIONS) { - my $catch_exceptions = ( - (exists $ENV{POE_CATCH_EXCEPTIONS}) - ? $ENV{POE_CATCH_EXCEPTIONS} - : 1 - ); + # The entire BEGIN block is a no-strict-refs zone. - if ($catch_exceptions) { - *CATCH_EXCEPTIONS = sub () { 1 }; - } - else { - *CATCH_EXCEPTIONS = sub () { 0 }; - } + no strict 'refs'; + + # Set up a constant that lets the user deactivate automatic + # exception handling. + + unless (defined &CATCH_EXCEPTIONS) { + my $catch_exceptions = ( + (exists $ENV{POE_CATCH_EXCEPTIONS}) + ? $ENV{POE_CATCH_EXCEPTIONS} + : 1 + ); + + if ($catch_exceptions) { + *CATCH_EXCEPTIONS = sub () { 1 }; + } + else { + *CATCH_EXCEPTIONS = sub () { 0 }; } } - { no strict 'refs'; - unless (defined &CHILD_POLLING_INTERVAL) { - # That's one second, not a true value. - *CHILD_POLLING_INTERVAL = sub () { 1 }; - } + unless (defined &CHILD_POLLING_INTERVAL) { + # That's one second, not a true value. + *CHILD_POLLING_INTERVAL = sub () { 1 }; } - { no strict 'refs'; - unless (defined &USE_SIGCHLD) { - # Perl >= 5.7.3 has safe signals support - # perlipc.pod#Deferred_Signals_(Safe_Signals) - # We decided to target 5.8.1 just to be safe :) - if ( $] >= 5.008001 and not RUNNING_IN_HELL ) { - *USE_SIGCHLD = sub () { 1 }; - } else { - *USE_SIGCHLD = sub () { 0 }; - } + unless (defined &USE_SIGCHLD) { + # Perl >= 5.7.3 has safe signals support + # perlipc.pod#Deferred_Signals_(Safe_Signals) + # We decided to target 5.8.1 just to be safe :) + if ( $] >= 5.008001 and not RUNNING_IN_HELL ) { + *USE_SIGCHLD = sub () { 1 }; + } else { + *USE_SIGCHLD = sub () { 0 }; } } - { no strict 'refs'; - unless (defined &USE_SIGNAL_PIPE) { - my $use_signal_pipe; - if ( exists $ENV{POE_USE_SIGNAL_PIPE} ) { - $use_signal_pipe = $ENV{POE_USE_SIGNAL_PIPE}; - } - if (RUNNING_IN_HELL) { - if ($use_signal_pipe) { - _warn( - "Sorry, disabling USE_SIGNAL_PIPE on $^O.\n", - "Programs are reported to hang when it's enabled.\n", - ); - } + unless (defined &USE_SIGNAL_PIPE) { + my $use_signal_pipe; + if ( exists $ENV{POE_USE_SIGNAL_PIPE} ) { + $use_signal_pipe = $ENV{POE_USE_SIGNAL_PIPE}; + } - # Must be defined to supersede the default. - $use_signal_pipe = 0; + if (RUNNING_IN_HELL) { + if ($use_signal_pipe) { + _warn( + "Sorry, disabling USE_SIGNAL_PIPE on $^O.\n", + "Programs are reported to hang when it's enabled.\n", + ); } - if ($use_signal_pipe or not defined $use_signal_pipe) { - *USE_SIGNAL_PIPE = sub () { 1 }; - } - else { - *USE_SIGNAL_PIPE = sub () { 0 }; - } + # Must be defined to supersede the default. + $use_signal_pipe = 0; + } + + if ($use_signal_pipe or not defined $use_signal_pipe) { + *USE_SIGNAL_PIPE = sub () { 1 }; + } + else { + *USE_SIGNAL_PIPE = sub () { 0 }; } } } @@ -420,51 +418,61 @@ local *STDERR = $trace_file_handle || *STDERR; confess( - "=== ($$) ===\n", - "Please address any warnings or errors above this message, and try\n", - "again. If there are none, or those messages are from within POE,\n", - "then please mail them along with the following information\n", - "to bug-POE\@rt.cpan.org:\n---\n@_\n-----\n" + "=== $$ === Please address any warnings or errors above this message,\n", + "=== $$ === and try again. If there are no previous messages, or they\n", + "=== $$ === are from within POE, then please mail them along with the\n", + "=== $$ === following information to bug-POE\@rt.cpan.org:\n", + "---\n@_\n-----\n" ); } sub _croak { local $Carp::CarpLevel = $Carp::CarpLevel + 1; local *STDERR = $trace_file_handle || *STDERR; - croak "($$) ", @_; + my $message = join("", @_); + $message =~ s/^/=== $$ === /mg; + croak $message; } sub _confess { local $Carp::CarpLevel = $Carp::CarpLevel + 1; local *STDERR = $trace_file_handle || *STDERR; - confess "($$) ", @_; + my $message = join("", @_); + $message =~ s/^/=== $$ === /mg; + confess $message; } sub _cluck { local $Carp::CarpLevel = $Carp::CarpLevel + 1; local *STDERR = $trace_file_handle || *STDERR; - cluck "($$) ", @_; + my $message = join("", @_); + $message =~ s/^/=== $$ === /mg; + cluck $message; } sub _carp { local $Carp::CarpLevel = $Carp::CarpLevel + 1; local *STDERR = $trace_file_handle || *STDERR; - carp "($$) ", @_; + my $message = join("", @_); + $message =~ s/^/=== $$ === /mg; + carp $message; } sub _warn { my ($package, $file, $line) = caller(); my $message = join("", @_); $message .= " at $file line $line\n" unless $message =~ /\n$/; - warn "=== $$ === $message"; + $message =~ s/^/=== $$ === /mg; + warn $message; } sub _die { my ($package, $file, $line) = caller(); my $message = join("", @_); $message .= " at $file line $line\n" unless $message =~ /\n$/; + $message =~ s/^/=== $$ === /mg; local *STDERR = $trace_file_handle || *STDERR; - die "($$) $message"; + die $message; } #------------------------------------------------------------------------------ @@ -862,13 +870,16 @@ sub _dummy_sigdie_handler { 1 } -sub _dispatch_event { +sub _dispatch_signal_event { my ( $self, $session, $source_session, $event, $type, $etc, $file, $line, $fromstate, $priority, $seq ) = @_; + # TODO - Regrettably, duplicate checking code in: + # _dispatch_signal_event(), _dispatch_event(). + if (ASSERT_EVENTS) { _confess " undefined dest session" unless defined $session; _confess " undefined source session" unless defined $source_session; @@ -886,111 +897,134 @@ ); } - ### Pre-dispatch processing. + my $signal = $etc->[0]; - # Some sessions don't do anything in _start and expect their - # creators to provide a start-up event. This means we can't - # &_collect_garbage at _start time. Instead, an ET_GC event is - # posted as part of session allocation. Simply dispatching it - # will trigger a GC sweep. + if (TRACE_SIGNALS) { + _warn( + " dispatching ET_SIGNAL ($signal) to ", + $self->_data_alias_loggable($session->ID) + ); + } - return 0 if $type & ET_GC; + # Step 1a: Reset the handled-signal flags. - # Preprocess signals. This is where _signal is translated into - # its registered handler's event name, if there is one. + local @POE::Kernel::kr_signaled_sessions; + local $POE::Kernel::kr_signal_total_handled; + local $POE::Kernel::kr_signal_type; - if ($type & ET_SIGNAL) { - my $signal = $etc->[0]; + $self->_data_sig_reset_handled($signal); - if (TRACE_SIGNALS) { - _warn( - " dispatching ET_SIGNAL ($signal) to ", - $self->_data_alias_loggable($session->ID) - ); - } + # Step 1b: Collect a list of sessions to receive the signal. - # Step 1a: Reset the handled-signal flags. - - local @POE::Kernel::kr_signaled_sessions; - local $POE::Kernel::kr_signal_total_handled; - local $POE::Kernel::kr_signal_type; - - $self->_data_sig_reset_handled($signal); + my @touched_sessions = ($session); + my $touched_index = 0; + while ($touched_index < @touched_sessions) { + my $next_target = $touched_sessions[$touched_index]->ID; + push @touched_sessions, $self->_data_ses_get_children($next_target); + $touched_index++; + } - # Step 1b: Collect a list of sessions to receive the signal. + # Step 1c: The DIE signal propagates up through parents, too. - my @touched_sessions = ($session); - my $touched_index = 0; - while ($touched_index < @touched_sessions) { - my $next_target = $touched_sessions[$touched_index]->ID; - push @touched_sessions, $self->_data_ses_get_children($next_target); - $touched_index++; + if ($signal eq "DIE") { + my $next_target = $self->_data_ses_get_parent($session->ID); + while (defined($next_target) and $next_target != $self) { + unshift @touched_sessions, $next_target; + $next_target = $self->_data_ses_get_parent($next_target->ID); } + } - # Step 1c: The DIE signal propagates up through parents, too. + # Step 2: Propagate the signal to the explicit watchers in the + # child tree. Ensure the full tree is touched regardless + # whether there are explicit watchers. - if ($signal eq "DIE") { - my $next_target = $self->_data_ses_get_parent($session->ID); - while (defined($next_target) and $next_target != $self) { - unshift @touched_sessions, $next_target; - $next_target = $self->_data_ses_get_parent($next_target->ID); - } - } + if ($self->_data_sig_explicitly_watched($signal)) { + my %signal_watchers = $self->_data_sig_watchers($signal); - # Step 2: Propagate the signal to the explicit watchers in the - # child tree. Ensure the full tree is touched regardless - # whether there are explicit watchers. - - if ($self->_data_sig_explicitly_watched($signal)) { - my %signal_watchers = $self->_data_sig_watchers($signal); - - $touched_index = @touched_sessions; - while ($touched_index--) { - my $target_session = $touched_sessions[$touched_index]; - $self->_data_sig_touched_session($target_session); - - my $target_sid = $target_session->ID; - next unless exists $signal_watchers{$target_sid}; - my ($target_event, $target_etc) = @{$signal_watchers{$target_sid}}; - - if (TRACE_SIGNALS) { - _warn( - " propagating explicit signal $target_event ($signal) ", - "(@$target_etc) to ", $self->_data_alias_loggable($target_sid) - ); - } + $touched_index = @touched_sessions; + while ($touched_index--) { + my $target_session = $touched_sessions[$touched_index]; + $self->_data_sig_touched_session($target_session); - # ET_SIGNAL_RECURSIVE is used here to avoid repropagating - # the signal ad nauseam. - $self->_dispatch_event( - $target_session, $self, - $target_event, ET_SIGNAL_RECURSIVE, [ @$etc, @$target_etc ], - $file, $line, $fromstate, monotime(), -__LINE__ + my $target_sid = $target_session->ID; + next unless exists $signal_watchers{$target_sid}; + my ($target_event, $target_etc) = @{$signal_watchers{$target_sid}}; + + if (TRACE_SIGNALS) { + _warn( + " propagating explicit signal $target_event ($signal) ", + "(@$target_etc) to ", $self->_data_alias_loggable($target_sid) ); } + + # ET_SIGNAL_RECURSIVE is used here to avoid repropagating + # the signal ad nauseam. + $self->_dispatch_event( + $target_session, $self, + $target_event, ET_SIGNAL_RECURSIVE, [ @$etc, @$target_etc ], + $file, $line, $fromstate, monotime(), -__LINE__ + ); } - else { - $touched_index = @touched_sessions; - while ($touched_index--) { - $self->_data_sig_touched_session($touched_sessions[$touched_index]); - } + } + else { + $touched_index = @touched_sessions; + while ($touched_index--) { + $self->_data_sig_touched_session($touched_sessions[$touched_index]); } + } - # Step 3: Check to see if the signal was handled. + # Step 3: Check to see if the signal was handled. - $self->_data_sig_free_terminated_sessions(); + $self->_data_sig_free_terminated_sessions(); - # If the signal was SIGDIE, then propagate the exception. + # If the signal was SIGDIE, then propagate the exception. - my $handled_session_count = (_data_sig_handled_status())[0]; - if ($signal eq "DIE" and !$handled_session_count) { - $kr_exception = $etc->[1]{error_str}; - } + my $handled_session_count = (_data_sig_handled_status())[0]; + if ($signal eq "DIE" and !$handled_session_count) { + $kr_exception = $etc->[1]{error_str}; + } - # Signal completely dispatched. Thanks for flying! - return; + # Signal completely dispatched. Thanks for flying! + return; +} + +sub _dispatch_event { + my ( + $self, + $session, $source_session, $event, $type, $etc, + $file, $line, $fromstate, $priority, $seq + ) = @_; + + if (ASSERT_EVENTS) { + _confess " undefined dest session" unless defined $session; + _confess " undefined source session" unless defined $source_session; + }; + + if (TRACE_EVENTS) { + my $log_session = $session; + $log_session = $self->_data_alias_loggable($session->ID) unless ( + $type & ET_START + ); + my $string_etc = join(" ", map { defined() ? $_ : "(undef)" } @$etc); + _warn( + " Dispatching event $seq ``$event'' ($string_etc) from ", + $self->_data_alias_loggable($source_session->ID), " to $log_session" + ); } + ### Pre-dispatch processing. + + # Some sessions don't do anything in _start and expect their + # creators to provide a start-up event. This means we can't + # &_collect_garbage at _start time. Instead, an ET_GC event is + # posted as part of session allocation. Simply dispatching it + # will trigger a GC sweep. + + return 0 if $type & ET_GC; + + # Preprocess signals. This is where _signal is translated into + # its registered handler's event name, if there is one. + if (TRACE_EVENTS) { _warn( " dispatching event $seq ``$event'' to ", @@ -1021,60 +1055,41 @@ defined $session ); - my $new_sig_die; - if ($type & (ET_CALL | ET_START | ET_STOP)) { - # Don't trigger $SIG{__DIE__} until we're ready to rethrow it. - local $SIG{__DIE__} = \&_dummy_sigdie_handler; - - eval { - if ($wantarray) { - $return = [ - $session->_invoke_state( - $source_session, $event, $etc, $file, $line, $fromstate - ) - ]; - } - elsif (defined $wantarray) { - $return = $session->_invoke_state( - $source_session, $event, $etc, $file, $line, $fromstate - ); - } - else { - $session->_invoke_state( - $source_session, $event, $etc, $file, $line, $fromstate - ); - } - }; + # Quiet SIGDIE if it's DEFAULT. If it's something special, then + # someone had better know what they're doing. - # Save the __DIE__ handler so we can check it outside this scope. - $new_sig_die = $SIG{__DIE__}; - } - else { - # Don't trigger $SIG{__DIE__} until we're ready to rethrow it. - local $SIG{__DIE__} = \&_dummy_sigdie_handler; + my $old_sig_die = $SIG{__DIE__}; + $SIG{__DIE__} = \&_dummy_sigdie_handler if ( + not defined $old_sig_die or $old_sig_die eq 'DEFAULT' + ); - eval { + eval { + if ($wantarray) { + $return = [ + $session->_invoke_state( + $source_session, $event, $etc, $file, $line, $fromstate + ) + ]; + } + elsif (defined $wantarray) { + $return = $session->_invoke_state( + $source_session, $event, $etc, $file, $line, $fromstate + ); + } + else { $session->_invoke_state( $source_session, $event, $etc, $file, $line, $fromstate ); - }; - - # Save the __DIE__ handler so we can check it outside this scope. - $new_sig_die = $SIG{__DIE__}; - } - - # If the user changed $SIG{__DIE__}, then we should honor that. - # Otherwise, by the time we get here, the last one has been restored. - $SIG{__DIE__} = $new_sig_die if $new_sig_die ne \&_dummy_sigdie_handler; - - # local $@ doesn't work quite the way I expect, but there is a - # bit of a problem if an eval{} occurs here because a signal is - # dispatched or something. + } + }; - if (CATCH_EXCEPTIONS) { - if (ref($@) or $@ ne '') { - my $exception = $@; - if(TRACE_EVENTS) { + # An exception happened? + # It was intially thrown under the $SIG{__DIE__} conditions that the + # user wanted. Any formatting, logging, etc. is already done. + + if (ref($@) or $@ ne '') { + if (CATCH_EXCEPTIONS) { + if (TRACE_EVENTS) { _warn( " exception occurred in $event when invoked on ", $self->_data_alias_loggable($session->ID) @@ -1086,7 +1101,8 @@ # Also if the active session has been forced back to $self via # POE::Kernel->stop(). if ($type & ET_STOP or $kr_active_session eq $self) { - $kr_exception = $exception; + # Propagate the exception up to the safe rethrow point. + $kr_exception = $@; } else { $self->_data_ev_enqueue( @@ -1098,22 +1114,35 @@ file => $file, line => $line, from_state => $fromstate, - error_str => $exception, + error_str => $@, }, ], __FILE__, __LINE__, undef ); } } + else { + # Propagate the exception up to the safe rethrow point. + $kr_exception = $@; + } } - elsif (ref $@) { - die $@; - } - elsif ($@ ne '') { - # Stringification hides "...propagated at". - die $@; - } - # Call with exception catching. + # Global $sig{__DIE__} changed? For shame! + # TODO - This warning is only needed if a SIGDIE handler is active. + # TODO - Likewise, setting a SIGDIE with a __DIE__ handler in play + # will be tricky or impossible. There should be some message. + + if ( + (not defined $old_sig_die or $old_sig_die eq 'DEFAULT') and + $SIG{__DIE__} ne \&_dummy_sigdie_handler + ) { + _warn( + " Event handler redefined global __DIE__ signal handler.\n", + " This may conflict with CATCH_EXCEPTIONS handling.\n", + " If global redefinition is necessary, do it in global code.\n", + ); + + $SIG{__DIE__} = $old_sig_die; + } # Clear out the event arguments list, in case there are POE-ish # things in it. This allows them to destruct happily before we set @@ -1256,13 +1285,17 @@ sub _rethrow_kr_exception { my $self = shift; - # Save the exception lexically. - # Clear it so it doesn't linger if run() is called again. + # It's quite common to see people wrap POE::Kernel->run() in an eval + # block and start things again if an exception is caught. + # + # This little lexical dance is actually important. It allows + # $kr_exception to be cleared if the die() is caught. + my $exception = $kr_exception; $kr_exception = undef; - # Rethrow it. - die $exception if $exception; + # The die is cast. + die $exception; } # Stops the kernel cold. XXX Experimental! @@ -1696,7 +1729,7 @@ # TODO The difference between synchronous and asynchronous events # should be made more clear in the documentation, so that people - # have a tendency not to abuse them. I discovered in xws that that + # have a tendency not to abuse them. I discovered in xws that # mixing the two types makes it harder than necessary to write # deterministic programs, but the difficulty can be ameliorated if # programmers set some base rules and stick to them. @@ -1715,6 +1748,8 @@ ) ); + $kr_exception and $self->_rethrow_kr_exception(); + $! = 0; return @return_value; } @@ -1733,6 +1768,8 @@ ) ); + $kr_exception and $self->_rethrow_kr_exception(); + $! = 0; return $return_value; } @@ -1751,6 +1788,8 @@ ); } + $kr_exception and $self->_rethrow_kr_exception(); + $! = 0; return; } diff -Nru libpoe-perl-1.3560/lib/POE/Loop/IO_Poll.pm libpoe-perl-1.3580/lib/POE/Loop/IO_Poll.pm --- libpoe-perl-1.3560/lib/POE/Loop/IO_Poll.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Loop/IO_Poll.pm 2013-12-08 08:10:35.000000000 +0000 @@ -6,7 +6,7 @@ package POE::Loop::IO_Poll; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # Include common signal handling. use POE::Loop::PerlSignals; @@ -30,7 +30,7 @@ use strict; # Be sure we're using a contemporary version of IO::Poll. There were -# issues with certain versios of IO::Poll prior to 0.05. The latest +# issues with certain versions of IO::Poll prior to 0.05. The latest # version is 0.01, however. use IO::Poll 0.01; diff -Nru libpoe-perl-1.3560/lib/POE/Loop/PerlSignals.pm libpoe-perl-1.3580/lib/POE/Loop/PerlSignals.pm --- libpoe-perl-1.3560/lib/POE/Loop/PerlSignals.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Loop/PerlSignals.pm 2013-12-08 08:10:35.000000000 +0000 @@ -8,7 +8,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # Everything plugs into POE::Kernel. package POE::Kernel; diff -Nru libpoe-perl-1.3560/lib/POE/Loop/Select.pm libpoe-perl-1.3580/lib/POE/Loop/Select.pm --- libpoe-perl-1.3560/lib/POE/Loop/Select.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Loop/Select.pm 2013-12-08 08:10:35.000000000 +0000 @@ -9,7 +9,7 @@ use POE::Loop::PerlSignals; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) =for poe_tests diff -Nru libpoe-perl-1.3560/lib/POE/Loop.pm libpoe-perl-1.3580/lib/POE/Loop.pm --- libpoe-perl-1.3560/lib/POE/Loop.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Loop.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) 1; @@ -517,7 +517,7 @@ =head3 loop_resume_filehandle FILE_HANDLE, IO_MODE This is a lightweight form of loop_watch_filehandle(). It is used -along with loop_pause_filehandle() to temporarily toggle a a watcher's +along with loop_pause_filehandle() to temporarily toggle a watcher's state for a FILE_HANDLE in a particular IO_MODE. =head1 HOW POE FINDS EVENT LOOP BRIDGES diff -Nru libpoe-perl-1.3560/lib/POE/NFA.pm libpoe-perl-1.3580/lib/POE/NFA.pm --- libpoe-perl-1.3560/lib/POE/NFA.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/NFA.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(carp croak); diff -Nru libpoe-perl-1.3560/lib/POE/Pipe/OneWay.pm libpoe-perl-1.3580/lib/POE/Pipe/OneWay.pm --- libpoe-perl-1.3560/lib/POE/Pipe/OneWay.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Pipe/OneWay.pm 2013-12-08 08:10:35.000000000 +0000 @@ -8,7 +8,7 @@ use base qw( POE::Pipe ); use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use IO::Pipely qw(pipely); diff -Nru libpoe-perl-1.3560/lib/POE/Pipe/TwoWay.pm libpoe-perl-1.3580/lib/POE/Pipe/TwoWay.pm --- libpoe-perl-1.3560/lib/POE/Pipe/TwoWay.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Pipe/TwoWay.pm 2013-12-08 08:10:35.000000000 +0000 @@ -8,7 +8,7 @@ use base qw( POE::Pipe ); use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use IO::Pipely qw(socketpairly); diff -Nru libpoe-perl-1.3560/lib/POE/Pipe.pm libpoe-perl-1.3580/lib/POE/Pipe.pm --- libpoe-perl-1.3560/lib/POE/Pipe.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Pipe.pm 2013-12-08 08:10:35.000000000 +0000 @@ -6,7 +6,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use IO::Pipely; diff -Nru libpoe-perl-1.3560/lib/POE/Queue/Array.pm libpoe-perl-1.3580/lib/POE/Queue/Array.pm --- libpoe-perl-1.3560/lib/POE/Queue/Array.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Queue/Array.pm 2013-12-08 08:10:35.000000000 +0000 @@ -5,7 +5,7 @@ use strict; use vars qw($VERSION @ISA); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) @ISA = qw(POE::Queue); use Errno qw(ESRCH EPERM); diff -Nru libpoe-perl-1.3560/lib/POE/Queue.pm libpoe-perl-1.3580/lib/POE/Queue.pm --- libpoe-perl-1.3560/lib/POE/Queue.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Queue.pm 2013-12-08 08:10:35.000000000 +0000 @@ -1,7 +1,7 @@ package POE::Queue; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(croak); diff -Nru libpoe-perl-1.3560/lib/POE/Resource/Aliases.pm libpoe-perl-1.3580/lib/POE/Resource/Aliases.pm --- libpoe-perl-1.3560/lib/POE/Resource/Aliases.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/Aliases.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ package POE::Resource::Aliases; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -155,7 +155,7 @@ See L for the public alias API. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource/Clock.pm libpoe-perl-1.3580/lib/POE/Resource/Clock.pm --- libpoe-perl-1.3560/lib/POE/Resource/Clock.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/Clock.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ package POE::Resource::Clock; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use strict; @@ -316,15 +316,15 @@ converts between this monotonic clock and the wall clock. The monotonic clock is used to keep an ordered queue of events. The wall -clock is used to comunicate the time with user code +clock is used to communicate the time with user code (L, L). There are 3 possible clock sources in order of preference: L, L and L. Only -C has a seperate monotonic and wall clock; the other two use the +C has a separate monotonic and wall clock; the other two use the same source for both clocks. -Clock selection and behaviour is controled with the following: +Clock selection and behaviour is controlled with the following: =head2 USE_POSIXRT @@ -366,15 +366,15 @@ export POE_USE_EXACT_EPOCH=1 or - sub POE::Kernel::USE_EACT_EPOCH { 1 } + sub POE::Kernel::USE_EXACT_EPOCH { 1 } There currently no way to exactly get the monotonic clock's epoch. Instead the difference between the current monotonic clock value to the realtime clock's value is used. This is obviously inexact because there is a slight delay between the 2 system calls. Setting USE_EXACT_EPOCH to true will -calculate an average of this difference over 250 ms or at least 20 samples. +calculate an average of this difference over 250 ms or at least 20 samples. What's more, the system calls are done in both orders (monotonic then -realtime, realtime then monotonic) to try and get a more eact value. +realtime, realtime then monotonic) to try and get a more exact value. Defaults to false. Only relevant if L is true. diff -Nru libpoe-perl-1.3560/lib/POE/Resource/Events.pm libpoe-perl-1.3580/lib/POE/Resource/Events.pm --- libpoe-perl-1.3560/lib/POE/Resource/Events.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/Events.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ package POE::Resource::Events; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -348,7 +348,13 @@ # TODO - Why can't we reverse these two lines? # TODO - Reversing them could avoid entering and removing GC marks. $self->_data_ev_refcount_dec($event->[EV_SOURCE], $event->[EV_SESSION]); - $self->_dispatch_event(@{$event}[EV_SESSION..EV_FROMSTATE], $priority, $id); + + if ($event->[EV_TYPE] & ET_SIGNAL) { + $self->_dispatch_signal_event(@{$event}[EV_SESSION..EV_FROMSTATE], $priority, $id); + } + else { + $self->_dispatch_event(@{$event}[EV_SESSION..EV_FROMSTATE], $priority, $id); + } # Stop the system if an unhandled exception occurred. # This wipes out all sessions and associated resources. @@ -395,7 +401,7 @@ See L for one public events API. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource/Extrefs.pm libpoe-perl-1.3580/lib/POE/Resource/Extrefs.pm --- libpoe-perl-1.3560/lib/POE/Resource/Extrefs.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/Extrefs.pm 2013-12-08 08:10:35.000000000 +0000 @@ -5,7 +5,7 @@ package POE::Resource::Extrefs; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -195,7 +195,7 @@ See L for the public extref API. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource/FileHandles.pm libpoe-perl-1.3580/lib/POE/Resource/FileHandles.pm --- libpoe-perl-1.3560/lib/POE/Resource/FileHandles.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/FileHandles.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ package POE::Resource::FileHandles; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -743,7 +743,7 @@ See L for the public file watcher API. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource/SIDs.pm libpoe-perl-1.3580/lib/POE/Resource/SIDs.pm --- libpoe-perl-1.3560/lib/POE/Resource/SIDs.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/SIDs.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ package POE::Resource::SIDs; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -100,7 +100,7 @@ See L for more information about session IDs. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource/Sessions.pm libpoe-perl-1.3580/lib/POE/Resource/Sessions.pm --- libpoe-perl-1.3560/lib/POE/Resource/Sessions.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/Sessions.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ package POE::Resource::Sessions; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -632,7 +632,7 @@ See L for friend methods between POE::Kernel and POE::Session classes. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource/Signals.pm libpoe-perl-1.3580/lib/POE/Resource/Signals.pm --- libpoe-perl-1.3560/lib/POE/Resource/Signals.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource/Signals.pm 2013-12-08 08:10:35.000000000 +0000 @@ -4,7 +4,7 @@ package POE::Resource::Signals; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) # These methods are folded into POE::Kernel; package POE::Kernel; @@ -101,12 +101,14 @@ # already been queued. my $polling_for_signals = 0; -# A flag determining whether there are child processes. -use constant BASE_SIGNAL_COUNT => ( - exists($INC{'Apache.pm'}) ? 0 : ( USE_SIGCHLD ? 0 : 1 ) -); +# There may be latent subprocesses in some environments. +# Or we may need to "always loop once" if we're polling for SIGCHLD. +# This constant lets us define those exceptional cases. +# We had some in the past, but as of 2013-10-06 we seem to have +# eliminated those special cases. +use constant BASE_SIGCHLD_COUNT => 0; -my $kr_has_child_procs = BASE_SIGNAL_COUNT; +my $kr_has_child_procs = BASE_SIGCHLD_COUNT; # A list of special signal types. Signals that aren't listed here are # benign (they do not kill sessions at all). "Terminal" signals are @@ -199,7 +201,7 @@ # least once. Starts false when running in an Apache handler so our # SIGCHLD hijinks don't interfere with the web server. $self->_data_sig_cease_polling(); - $kr_has_child_procs = BASE_SIGNAL_COUNT; + $kr_has_child_procs = BASE_SIGCHLD_COUNT; } @@ -253,7 +255,7 @@ } if ($kr_has_child_procs) { - _warn "!!! Kernel has child processes.\n"; + _warn "!!! Kernel has $kr_has_child_procs child process(es).\n"; } if ($polling_for_signals) { @@ -1048,7 +1050,7 @@ See L for POE's public signals API. -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Resource.pm libpoe-perl-1.3580/lib/POE/Resource.pm --- libpoe-perl-1.3560/lib/POE/Resource.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resource.pm 2013-12-08 08:10:35.000000000 +0000 @@ -1,7 +1,7 @@ package POE::Resource; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) 1; @@ -64,7 +64,7 @@ L, L -Also see L for for public information about POE +Also see L for public information about POE resources. =head1 BUGS diff -Nru libpoe-perl-1.3560/lib/POE/Resources.pm libpoe-perl-1.3580/lib/POE/Resources.pm --- libpoe-perl-1.3560/lib/POE/Resources.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Resources.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) my @resources = qw( POE::XS::Resource::Aliases @@ -69,7 +69,7 @@ =head1 SEE ALSO -See L for for public information about POE +See L for public information about POE resources. See L for general discussion about resources and the diff -Nru libpoe-perl-1.3560/lib/POE/Session.pm libpoe-perl-1.3580/lib/POE/Session.pm --- libpoe-perl-1.3560/lib/POE/Session.pm 2013-08-20 20:35:59.000000000 +0000 +++ libpoe-perl-1.3580/lib/POE/Session.pm 2013-12-08 08:10:35.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use vars qw($VERSION); -$VERSION = '1.356'; # NOTE - Should be #.### (three decimal places) +$VERSION = '1.358'; # NOTE - Should be #.### (three decimal places) use Carp qw(carp croak); use Errno; @@ -1018,7 +1018,7 @@ also be compared against C<$_[KERNEL]> to verify that timers and other POE::Kernel-generated events were not spoofed. -This C reponds to the sender with an "echo" event that +This C responds to the sender with an "echo" event that contains all the parameters it received. It avoids a feedback loop by ensuring the sender session and event (STATE) are not identical to the current ones. @@ -1261,7 +1261,7 @@ POE::Session sessions support a small number of options, which may be initially set with the C