Skip to content

Commit

Permalink
Add support for POE_CATCH_EXCEPTIONS environment variable.
Browse files Browse the repository at this point in the history
Apply Justin Hunter's doc patch for POE::XS::Loop::EPoll.
  • Loading branch information
rcaputo committed Jun 9, 2010
1 parent 5b63048 commit ddab689
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/POE/Kernel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,18 @@ BEGIN {
# automatic exception handling
{ no strict 'refs';
unless (defined &CATCH_EXCEPTIONS) {
*CATCH_EXCEPTIONS = sub () { 1 };
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 };
}
}
}

Expand Down Expand Up @@ -3701,7 +3712,7 @@ does.
}
);
=head4 delay_adjust EVENT_NAME, SECONDS_FROM_NOW
=head4 delay_adjust ALARM_ID, SECONDS_FROM_NOW
delay_adjust() changes a timer's due time to be SECONDS_FROM_NOW.
It's useful for refreshing watchdog- or timeout-style timers. On
Expand Down

0 comments on commit ddab689

Please sign in to comment.