Text::HikiDoc::Plugin - Base class of plug-in module for Text::HikiDoc .
package Text::HikiDoc::Plugin::your-plugin use base 'Text::HikiDoc::Plugin'; sub to_html { my $self = shift; my @args = @_; # # plug-in logic # return $string; }
Text::HikiDoc::Plugin can add a new format to Text::HikiDoc .
When Text::HikiDoc encounters the description of {{your-plugin}}, Text::HikiDoc::Plugin::your-plugin::to_html() is executed. And {{your-plugin} is replaced with the returned character string.
There are some methods for you to pass the plug-in the argument. The following result the same all.
{{br '2'}} or {{br(2)}} or {{br '2' }}
To install Text::HikiDoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::HikiDoc
CPAN shell
perl -MCPAN -e shell install Text::HikiDoc
For more information on module installation, please visit the detailed CPAN module installation guide.