Writing Plugins

Table of Contents
E.1. The File Format
E.2. A Sample Plugin
E.3. Disposing Data When the Plugin Is Unloaded
E.4. Enabling and Disabling Plugins
E.5. Conditional Loading of Plugins
E.5.1. Plugins That Require Other Plugins
E.6. Using GTK+ From Plugins
E.7. Plugin Conventions

This appendix will describe how you can write your own plugins for KildClient. It will describe the format of the plugin file, what it should have, and some guidelines that all plugins should follow.

The first thing to decide when writing a plugin is the name. Since each plugin defines a Perl package, the name should be a valid name for a Perl package. Moreover, it is a good practice to name the plugin file with the name of the plugin (although the name of the file could be different), so stick with letters, numbers, and the underscore. It should not start with an underscore, however, because all identifiers that start with an underscore are understood to be interal of KildClient.