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

Perldoc::DOM - Represent a Perldoc document, DOM-style

SYNOPSIS

 $kwoc = new Perldoc::DOM();

 my $body = $kwoc->root();
 my @next = $body->daughters();

 my $node = $kwoc->klink("S09#//para/");  # KLINK lookup

DESCRIPTION

A Perldoc::DOM is a directed acyclic graph, which is a Computer Scientist's way of saying "tree" (cue: the Fast Show "aliens that say 'tree' skit").

CREATING A Perldoc::DOM TREE

Perldoc::DOM trees are seldom created using the Tree::DAG_Node interface.

Normally, they will be constructed as a series of events fired in by a Perldoc::Sender, such as another Perldoc::DOM, a Perldoc::Preprocessor, or a Perldoc::Parser.

METHODS

$dom->receiver($object)
$dom->send_one()
$dom->send_all()

Perldoc::DOM supports the Perldoc::Sender API.

$dom->restart()

Clear the state of the Perldoc::Sender, useful for guaranteeing that you don't get a partial tree out of your DOM object.

$dom->start_document()
$dom->end_document()
$dom->start_element($name, \%o)
$dom->end_element([$name])
$dom->characters($data, [\%o])
$dom->processing_instruction([\%o])
$dom->ignorable_whitespace([\%o])

Supports the Perldoc::Receiver API.

$dom->make_element($name, \%o)
$dom->make_text($data, [\%o])
$dom->make_pi(\%o)
$dom->make_ws(\%o)

Sub-classes of Perldoc::DOM may wish to override these methods, which are called when creating nodes during DOM tree construction.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 61:

=over without closing =back

Around line 124:

Unterminated B<...> sequence