From 2baee1bb5321342f4065914815b057e64082706c Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sun, 28 Jan 2018 18:17:07 -0300 Subject: Update examples --- examples/rooms.p6 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/rooms.p6 b/examples/rooms.p6 index 7a2de98..4f0a0c7 100644 --- a/examples/rooms.p6 +++ b/examples/rooms.p6 @@ -1,7 +1,12 @@ use v6; use Matrix::Client; -my $c = Matrix::Client.new: :home-server; -$c.login: @*ARGS[0], @*ARGS[1]; -say $c.rooms(:sync); +sub MAIN($username, $pass) { + my $c = Matrix::Client.new(home-server => 'https://matrix.deprecated.org'); + $c.login: $username, $pass; + + for $c.joined-rooms -> $room { + $room.say; + } +} -- cgit v1.2.3-70-g09d2