
Parrot::Docs::POD2HTML - POD to HTML formatter

use Parrot::Docs::POD2HTML;

Parrot::Docs::POD2HTML subclasses Pod::Simple::HTML to provide various Parrot-specific formatting features, such as linking C<Parrot::Module> and F<file>, and using the Parrot house-style provided by Parrot::HTMLPage.
new()Extend Pod::Simple::HTML method to accept PIR and PASM sections that contain example code, which will be put into a <pre> HTML element.
do_beginning()Reimplements the Pod::Simple::HTML method to add a header to the start of the document.
do_middle()Does the middle of the document. This splits up the long do_middle() method in Pod:Simple::HTML, calling the various process_* methods below. This makes it easier to where the custom bits of Parrot-specific formatting have to be inserted.
process_start_token($token)Process a start token.
process_link_start_token($token)Processes the link start token.
process_code_start_token($token)Processes the code start token. If the code text is the name of a Parrot Perl module, and the current documentation file is not the file for that module, then the documentation file for the module is linked to.
process_file_start_token($token)Processes the file start token. If the text of the next token is a file path and that file contains POD, then a link will be made to that file's documentation file.
process_item_text_or_head_start_token($token)Process the item text or head start token.
process_data_start_token($token)Processes a data start token.
process_for_start_token($token)Processes a for start token.
process_other_start_token($token)Processes a start token not processable by the above methods.
process_end_token($token)Processes an end token.
process_text_token($token)Processes the specified text token. URLs which are not in link tags are linked here for convenience.
do_pod_link($link)This is reimplemented here to avoid a bug in Pod::Simple::HTML.
resolve_pod_page_link($to, $section)Resolves the POD link. Perl modules are converted to paths.
href_for_perl_module($module)Returns the path to the Perl module's HTML file relative to the current documentation page. Currently only lib/Parrot modules are linkable. Returns undef if the current documentation file is the file for the module.
do_end()Reimplements the Pod::Simple::HTML method to add a footer to the end of the document.
html_for_file($file)Returns the HTML for the specified file.
write_html($source, $target, $rel_path, $item)Writes an HTML version of the file specified by $rel_path in $source to the equivalent location in $target.
append_html_suffix($path)Returns $path with and HTML file suffix added.
html_link($href, $text)Returns an HTML anchor with the specified "href".
Converts the path for use in an "href".
Sequences of backslashes are converted to forward slash.
esc(@strings)esc($string)Reimplemented here to silence a Pod::Simple::HTML warning.

In order to avoid modifying Pod:Simple::HTML, large sections of its code have been copied here, and then refactored and adjusted to enable various bits of Parrot-specific behaviour.