sub set_type {
### Sets data type for object.
my $self= shift;
$Type_of{$self} = shift if @_;
}
This would include the set_type
method in the documentation, along with the description of the method that appears after the triple hash. Multiple lines are also permitted, so long as each one starts with a triple hash. Lines starting with returns are appended to the bottom of the documentation for a method. For example, if the above set_type
method was turned into an accessor:
sub type {
### Accessor for data type
### Returns data type
my $self= shift;
$Type_of{$self} = shift if @_;
return $Type_iof{$self};
}
A number of short hand keywords1 can also be used for swift documenting:
sub type {
### a
my $self= shift;
$Type_of{$self} = shift if @_;
return $Type_iof{$self};
}
Keywords can also be combined with an additional description. For example, in a constructor:
sub new {
### c
### Creates a new inside-out class representing
### Ensembl data.
my $self= shift;
$Type_of{$self} = shift if @_;
return $Type_iof{$self};
}
Additional HTML formatting can also be included. Empty comments are converted into blank lines.
sub new {
### c
### Creates a new inside-out class representing
### Ensembl data.
###
### This constructor returns a new Ensembl data class.
my $self= shift;
$Type_of{$self} = shift if @_;
return $Type_iof{$self};
}
package EnsEMBL::Web::Root;
### The root class for web code modules
### in Ensembl.
use strict;
use warnings;
sub new {
...
}
1;
@ISA
array in the perl module, so no additional documentation markup is required.
sub panel {
### Returns the {{EnsEMBL::Web::Document::Panel}} associated with
### this object. If no panel is found, a new one is created with
### {{new_panel}}.
...
}
sub new_panel {
### Creates and returns a new panel by calling
### {{EnsEMBL::Web::Document::Panel::new}}.
...
}
sub new {
### c
### Inside-out class for z-menus.
### ___
### Arg 1: class name
### Arg 2: parameter hash
### Description: Constructor method for {{EnsEMBL::Web::Interface::ZMenu}}
### objects. Receives a parameter hash of the following keys:
### Title: title of the zmenu
### Type: type of zmenu
### Ident: unique identifier of zmenu (really should be unique!)
### Add: array of {{EnsEMBL::Web::Interface::ZMenuItem}} objects
### add to the ZMenu
### Remove: array of strings of ZMenuItem objects to remove from
### the ZMenu
### View: The {{EnsEMBL::Web::Interface::ZMenuView}} object to
### use for rendering. A new one is automatically created
### if no object is specified.
### Returns: A new {{EnsEMBL::Web::Interface::ZMenu}}.
### ___
###
...
}
As with text documentation, references to other modules and methods can also be included in the tables.
EnsEMBL::Web::Tools::Document
classes are responsible for finding and parsing the API modules, and producing the HTML documentation pages. EnsEMBL::Web::Tools::Document
object is responsible for finding the module files, and creates a series of EnsEMBL::Web::Tools::Document::Module
objects. Each of these objects does the heavy lifting of parsing the module source code, and in turn creates a series of EnsEMBL::Web::Tools::Document::Method
objects. The Document
object then processes these data objects and passes them to the EnsEMBL::Web::Tools::DocumentView
object, which actually writes the HTML documentation files.
htdocs/docs
directory.
document.pl
creates the necessary EnsEMBL::Web::Document
classes, performs the index, and writes the HTML output based on a collection of command line parameters.update_docs.pl
runs document.pl
with a default set of command line parameters. This indexes all web code modules, and associated plugins by default, and places the resulting HTML documentation inside a temp
directory. This directory should be copied to a web accessible location for viewing.
keywords
accessor of the EnsEMBL::Web::Tools::Document
object performing the API indexing (see Indexing the API). ↑
© 2025 Inserm. Hosted by genouest.org. This product includes software developed by Ensembl.