From: Matt S Trout Date: Tue, 6 Dec 2011 22:39:26 +0000 (+0000) Subject: comment the ::Next code a bit X-Git-Tag: v0.001001~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9fcdac6d65032d8020e9f3046a715dedca5c0ed4;p=scpubgit%2FTak-Daemon.git comment the ::Next code a bit --- diff --git a/lib/Tak/Daemon/DaemonService.pm b/lib/Tak/Daemon/DaemonService.pm index d608dca..80f0f08 100644 --- a/lib/Tak/Daemon/DaemonService.pm +++ b/lib/Tak/Daemon/DaemonService.pm @@ -31,8 +31,10 @@ sub handle_become_successor { my ($self) = @_; my $done; $self->set_done_cb(sub { $done = 1 }); + # because this is funnier than "no warnings 'once'". Also because + # I don't have to stop and think "what else is in this lexical scope?" $Tak::STDIOSetup::Next = $Tak::STDIOSetup::Next = sub { - my $x = $self; # close over + my $x = $self; # close over while evading void context warnings $0 = 'tak-daemon-node'; Tak->loop_until($done); };