7.5. Controlling Worlds with Perl

In Section 3.3, “Closing Worlds and Exiting KildClient” it was explained that you can disconnect from a World with the $world->dc function. It now should be clear why there is a $world-> in front. Another function that you know already is $world->close, to disconnect and close a World.

There are a few more functions that allow you to control Worlds from Perl. The $world->next and $world->prev move to the next or previous world in the list of tabs. It is also possible to pass an argument to them, specifying how many Worlds to move. So, $world->next(2) moves two Worlds forward, and $world->prev(3) moves three Worlds back.

To go to a specific World, use the gotow function (which does not belong to the World class, since it does not depend on a particular World), passing as argument a string with the name of the World.

Finally, you can use the quit function to disconnect and close all Worlds and then exit KildClient.