You are viewing Revision 1 of Plugins

Developing plugins for Aneuch is easy and fun. Plugins are simple PERL scripts that allow you to extend the feature set of Aneuch.

All plugins will reside in a folder called 'plugins' that lives within the $DataDir. Plugin names will end in either '.pl' or '.pm'. If you want to disable a plugin, simply add '.disabled' (or anything, really) to the end of its name and it will not be loaded.

Plugins should have a hash-bang (#!) line at the very top that points at PERL, normally #!/usr/bin/perl. The next line will say package Aneuch;. Following that should be a line that says push @Plugins followed by a string which contains plugin name, version, and a description and link to plugin homepage. An example would be:

push @Plugins, "plainhtml.pl, version 1.0 - Allows the use of plain HTML pages (instead of markup) <a href='http://aneuch.myunixhost.com/Plugins_PlainHTML'>";

After this, a plugin may begin defining variables and subs as it sees fit.

A plugin may replace a built-in sub by doing the following:
*OldMarkup = *Markup;
*Markup = *NewMarkup;

And then go on to define sub NewMarkup.