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.
$name
and$index_path
are required, though$index_path
defaults to index.html if undefined or an empty string is supplied.@contents
is 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.$source
is aParrot::Docs::Directory
for the distribution directory. It defaults to the current working directory.$target
is theParrot::Docs::Directory
in which to write the HTML. It defaults to the docs/html directory.If
$silent
is true then progress is not reported. html_header()
-
Returns the HTML header.
-
Returns the HTML footer.
SEE ALSO
Parrot::Docs::Group
, Parrot::Docs::Item
.