Too confusing and ugly.
Couple alternatives. this is the current way.
func ping {
need $msg
%send("PONG :" + $msg.params[-1])
}
Passing the object as a normal argument
func ping {
need $msg, $conn
$conn.send("PONG :" + $msg.params[-1])
}
Using _self and a requirement for the special variable *self
func ping {
need *self: Connection, $msg
@send("PONG :" + $msg.params[-1])
}
Too confusing and ugly.
Couple alternatives. this is the current way.
Passing the object as a normal argument
Using
_selfand a requirement for the special variable*self