Padre::Help - Padre Help Provider API
The Padre::Help class provides a base class, default implementation and API documentation for help provision support in Padre.
Padre::Help
In order to setup a help system for a document type called XYZ one has to do the following: Create a module called Padre::Help::XYZ that subclasses the Padre::Help module and override 3 methods: help_init, help_list and help_render.
XYZ
Padre::Help::XYZ
help_init
help_list
help_render
In the class representing the Document (Padre::Document::XYZ) one should override the get_help_provider method and return an object of the help provide module. In our case it should contain
Padre::Document::XYZ
get_help_provider
require Padre::Help::XYZ; return Padre::Help::XYZ->new;
(TO DO: Maybe it should only return the name of the module)
The help_init method is called by the new method of Padre::Help once for every document of XYZ kind. (TO DO: maybe it should be only once for every document type, and not once for every document of that type).
help_list should return a reference to an array holding the possible strings the system can provide help for.
help_render is called by one of the keywords, it should return the HTML to be displayed as help and another string which is the location of the help. Usually a path to a file that will be used in the title of the window.
To install Padre, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Padre
CPAN shell
perl -MCPAN -e shell install Padre
For more information on module installation, please visit the detailed CPAN module installation guide.