Skip to content

Instantly share code, notes, and snippets.

@lizmat
Last active December 15, 2017 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizmat/431807927c755c4eefca2ecf50395dd8 to your computer and use it in GitHub Desktop.
Save lizmat/431807927c755c4eefca2ecf50395dd8 to your computer and use it in GitHub Desktop.
possible fix for araraloren
sub follow(IO::Handle $fh --> Supply) {
$fh.seek(0, SeekFromEnd);
$fh does role {
method get() {
sleep .1 while $fh.eof;
$fh.IO::Handle::get
}
}
supply {
whenever $fh.lines {
.emit;
QUIT { note "QUIT ", &?ROUTINE; }
LAST { note "LAST ", &?ROUTINE; }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment