From: Matt S Trout Date: Thu, 17 Nov 2011 19:58:28 +0000 (+0000) Subject: always set $0 for stdio nodes, add support for a $Next X-Git-Tag: v0.001002~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FTak.git;a=commitdiff_plain;h=a2a6ec176b3ba0d75b1a06a4511a882a785582a9 always set $0 for stdio nodes, add support for a $Next --- diff --git a/lib/Tak/STDIOSetup.pm b/lib/Tak/STDIOSetup.pm index d090f06..30c9851 100644 --- a/lib/Tak/STDIOSetup.pm +++ b/lib/Tak/STDIOSetup.pm @@ -34,14 +34,13 @@ sub run { on_close => sub { $done = 1 } ); $connection->receiver->service->register_weak(remote => $connection); - if ($0 eq '-') { - $0 = 'tak-stdio-node'; - } + $0 = 'tak-stdio-node'; log_debug { "Node starting" }; # Tell the other end that we've finished messing around with file # descriptors and that it's therefore safe to start sending requests. print $stdout "Ssyshere\n"; Tak->loop_until($done); + if (our $Next) { goto &$Next } } 1;