Angerwhale::Format - Dispatches formatting of posts/comments to sub-modules
A Angerwhale::Format extension is simple to write. It needs the following routines:
Initialize the formatter. Returns a blessed reference, or dies on failure.
This method will be called with the "type" to format. Return 0 if you can't handle it, or a higher number based on how well you can format the "type". 1 is the lowest, 100 is the highest.
This method will be called if your module returned the highest value for can_format. It is passed the text to format, and the type. It should return the text formatted as HTML.
can_format
Like format, but return plain text instead of HTML. If format_html or format returns a VirtualComment, this method should return the same one.
format
Returns a list of hashrefs, where each hashref consists of:
The name of the type, i.e. the name that can_format will accept.
The human-readable description of the type.
To install Angerwhale, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Angerwhale
CPAN shell
perl -MCPAN -e shell install Angerwhale
For more information on module installation, please visit the detailed CPAN module installation guide.