Created
September 25, 2015 16:42
-
-
Save anonymous/c4b70a65e2475ff25968 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $server-line-supply = supply { | |
my $chars = ''; | |
whenever $conn.chars-supply { | |
$chars ~= $_; | |
my @lines = $chars.split(/\n/); | |
if @lines[*-1] eq '' { | |
$chars = @lines[*-2]; | |
emit $_ for @lines[0..*-3]; | |
} | |
else { emit $_ for @lines; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment