|module_roots||An array reference of directories to search for Pod files, or for the paths of Pod files themselves. These files and directories will be searched for the Pod documentation to build the browser.|
|doc_root||Path to a directory to use as the site document root. This directory will be created if it does not already exist.|
Base URI for the Pod site. For example, if your documentation will be served
from /docs/2.0/api, then that would be the base URI for the site.
May be an array reference of base URIs. This is useful if your Pod site will be served from more than one URL. This is common for versioned documentation, where you might have docs in /docs/2.0/api and a symlink to that directory from /docs/current/api. This parameter is important to get links from one page to another within the site to work properly.
|name||The name of the site. Defaults to the name of the main module.|
|versioned_title||If true, the version of the main module will be included in the site title.|
|label||Optional label to append to the site title. Something like API Browser is recommended.|
|main_module||The main module defining the site. For example, if you were building a documentation site for the Moose, Class::MOP, and MooseX namespaces, the main module would be Moose. Defaults to the first module found when all module names are sorted in alphabetical order.|
|sample_module||Module to use in the example documentation links in the table of contents. This is the main page displayed on the site|
|index_file||Name of the site index file. Defaults to index.html, but you might need it to be, e.g., default.html if you were deploying to a Windows server.|
|css_path||Path to CSS files. Defaults to the base URI.|
If youre building a new site over an old site, by default Pod::Site will not
If you want it to replace them, pass a true value for this parameter.
|favicon_uri||Link to favicon file. Extracts type from extension.|
|verbose||Pass a value greater than 0 for verbose output. The higher the number, the more verbose (up to 3).|
Builds the Pod::Site. This is likely the only instance method youll ever need. In summary, it:
o Searches through the module roots for Pod files (modules and scripts) using Pod::Simple::Search o Creates HTML files for all the files found using Pod::Simple::HTMLBatch and a custom subclass of Pod::Simple::XHTML o Iterates over the list of files to create the index with the navigation tree and the table of contents page (toc.html).
Iterates through the Pod files found by Pod::Simple::Search and sorts them into two categories: modules and scripts. All appear in the navigation tree, but scripts are listed under bin and are not otherwise in tree form.
Starts the HTML for the navigation document, writing the output to $filehandle.
Starts the HTML for the table of contents document, writing the output to $filehandle.
Writes the content of the module tree to the navigation document via $filehandle. The $tree argument contains the tree. This method is called recursively as it descends through the tree to create the navigation tree.
Outputs the list of script files to the table of contents document via $filehandle.
Finishes the HTML for the navigation document, writing the output to $filehandle.
Finishes the HTML for the table of contents document, writing the output to $filehandle.
Does the work of invoking Pod::Simple::HTMLBatch to look for Pod files and write out the corresponding HTML files for each.
$ps->get_desc( $module, $file);
Parses the Pod in $file to find the description of $module. This is the text after the hyphen in the =head1 Name section of the Pod, often called the abstract by toolchain modules like Module::Build.
my $mod = $ps->main_module;
Returns the name of the main module as specified by the main_module parameter to new() or, if none was specified, as first module in the list of found modules, sorted case-insensitively.
my $mod = $ps->sample_module;
The name of the module to use for the sample links in the table of contents. Defaults to main_module.
my $name = $ps->name;
Returns the name of the site. Defaults to main_module.
my $label = $ps->label;
Returns the optional label to append to the site title. None by default.
my $title = $ps->title;
my $header = $ps->nav_header;
my $versioned_title = $ps->versioned_title;
Returns the version number of the main module.
my $roots = $ps->module_roots;
Returns an array reference of the directories and files passed to the module_roots parameter to new().
my $doc_root = $ps->doc_root;
Returns the path to the document root specified via the doc_root parameter to new().
my $base_uri = $ps->base_uri;
my $index_file = $ps->index_file;
Returns the value of index files as specified via the index_file parameter to new(). Defaults to index.html.
my $css_path = $ps->css_path;
Returns the URI path for CSS files as specified via the css_path parameter to new(). Defaults to an empty string, meaning it will be fetched from the directory relative to the current URL. This is the recommended value as it allows any URL under the base URL to work, such as /docs/MooseX::Declare, enabled by the Web server configuration.
my $js_path = $ps->js_path;
my $replace_css = $ps->replace_css;
my $replace_js = $ps->replace_js;
my $mod_files = $ps->mod_files;
Returns a tree structure containing all the module files with Pod found by Pod::Simple::Search. The structure has file base names as keys and full file names as values. For nested structures, the keys are the last part of a module name and the values are an array of more file names and module branches. For example, a partial tree of module files for Moose might be structured like this:
my $bin_files = $ps->bin_files;
Returns a tree structure containing all the scripts with Pod found by Pod::Simple::Search. The structure has file names as keys and full file names as values.
my $verbose = $ps->verbose;
Returns the value passed for the verbose parameter to new(). Defaults to 0.
This module is stored in an open GitHub repository <http://github.com/theory/pod-site/>. Feel free to fork and contribute!
o Add support for resizing the nav pane. o Allow right and middle clicks on nav window links to copy links or open them in a new Window (Issue #1 <http://github.com/theory/pod-site/issues/1>).
Found a bug? Please file a report <http://github.com/theory/pod-site/issues>!
This module is stored in an open GitHub repository, <http://github.com/theory/pod-site/>. Feel free to fork and contribute!
Please file bug reports at <http://github.com/theory/pod-site/issues/>.
David E. Wheeler <firstname.lastname@example.org>
Copyright (c) 2004-2015 David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||POD::SITE (3)||2016-04-03|