The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Parrot::Docs::Group - Group of documentation items

SYNOPSIS

use Parrot::Docs::Group;

my $group = Parrot::Docs::Group->new('Usual suspects', '',
    Parrot::Docs::Item->new('', 'foo'),
    Parrot::Docs::Item->new('', 'bar'));

DESCRIPTION

A group is a number of items with some optional descriptive text.

This is a subclass of Parrot::Docs::Item.

Methods

new_group($name, $text, @items)

Returns a new group.

Use this when creating groups in a subclass's new() method.

new($name, $text, @contents)

Returns a new group.

$name and $text are required, though the text can be an empty string. @contents is one or more Parrot::Docs::Item instances, or relative paths.

name()

Returns the name of the group.

html_link()

Groups have no HTML link. This method returns an empty string which will be discarded when building the navigation bar.

write_html($source, $target, $silent)

write_html() is called on each item in the group.

Some HTML-formatted text describing the files linked to is returned.

write_contents_html($source, $target, $silent)

Iterates over the group's contents and calls write_html() on each one.

Some HTML-formatted text describing the files linked to is returned.

contents_relative_to_source($source)

Returns the contents of the group interpreted relative to the source directory.

SEE ALSO

Parrot::Docs::Section, Parrot::Docs::Item.