NAME
Parrot::Docs::Section - Docmentation section
SYNOPSIS
use Parrot::Docs::Section;
my $s = Parrot::Docs::Section->new('Usual Suspects', 'index.html',
'here they are...',
Parrot::Docs::Item->new('old faithful', 'foo'),
Parrot::Docs::Group->new('Bar', 'no jeans',
Parrot::Docs::Item->new('time please', 'bar', 'pub')));
$s->write_html();
DESCRIPTION
A section is an HTML page containing links to one or more, grouped or ungrouped items.
This is a subclass of Parrot::Docs::Group.
Methods
root_section()-
Returns the root section.
is_root_section()-
Returns whether the section is the root section.
new_section($name, $text, @items)-
Returns a new section.
Use this when creating subsection in a subclass's
new()method. new($name, $index_path, @contents)-
Returns a new section.
$nameand$index_pathare required, though$index_pathdefaults to index.html if undefined or an empty string is supplied.@contentsis one or more sections, groups and/or items. html_link($path)-
Returns the HTML link for the section.
write_html($source, $target, $silent)-
Calls
write_html()on the contents of the section.$sourceis aParrot::Docs::Directoryfor the distribution directory. It defaults to the current working directory.$targetis theParrot::Docs::Directoryin which to write the HTML. It defaults to the docs/html directory.If
$silentis true then progress is not reported. html_header()-
Returns the HTML header.
-
Returns the HTML footer.
SEE ALSO
Parrot::Docs::Group, Parrot::Docs::Item.