Permalink
Browse files

Try not to forget the return value of run-timers(). Kudos to Ian F fo…

…r catching that one
  • Loading branch information...
1 parent fd85995 commit 0d20c7275a8249b44ce4f3ee76e14860462188ca @tadzik committed Oct 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/MuEvent.pm
View
@@ -79,8 +79,8 @@ sub clock {
sub run-once {
my $seen-action = False;
- $seen-action = run-timers();
- $seen-action = run-sockets();
+ $seen-action += run-timers();
+ $seen-action += run-sockets();
if not $seen-action {
for @idlers { $_<cb>.(|$_<params>) }
}

3 comments on commit 0d20c72

@losinggeneration

Personally I'd probably do this:
my $seen-action = run-timers() || run-sockets();

@tadzik
Owner
tadzik commented on 0d20c72 Nov 9, 2011

Not bad indeed; I was probably thinking about some future run-foo() calls.

@losinggeneration

Indeed. Four to six functions OR'd like that would probably be about the point I'd switch to a different syntax for clarity.

Please sign in to comment.