From e50b8fa9e02b19ece80ebeb576051e451d3a7812 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Tue, 24 Mar 2020 19:37:11 -0300 Subject: Rename some things to from perl6 to raku --- examples/run.raku | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 examples/run.raku (limited to 'examples/run.raku') diff --git a/examples/run.raku b/examples/run.raku new file mode 100644 index 0000000..af1b188 --- /dev/null +++ b/examples/run.raku @@ -0,0 +1,21 @@ +#!/usr/bin/env raku +use v6; +use lib ; +use Matrix::Client; + +sub MAIN(Str:D $username, Str:D $password, :$home-server = "https://matrix.deprecated.org") { + my Matrix::Client $client .= new: :$home-server; + $client.login($username, $password); + + my $sup = $client.run(:sleep<5>); + + signal(SIGINT).tap({ + say "Bye"; + $client.logout; + exit 0; + }); + + react whenever $sup -> $ev { + say $ev; + } +} -- cgit v1.2.3-54-g00ecf