NAME
OODoc::Text::Structure - set of paragraphs with examples and subroutines
INHERITANCE
OODoc::Text::Structure
is an OODoc::Text
is an OODoc::Object
OODoc::Text::Structure is extended by
OODoc::Text::Chapter
OODoc::Text::Section
OODoc::Text::SubSection
OODoc::Text::SubSubSection
SYNOPSIS
# Cannot be instantiated itself
DESCRIPTION
The OODoc::Text::Structure class is used as base class for the OODoc::Text::Chapter, OODoc::Text::Section, and OODoc::Text::SubSection classes. Each of these classes group some paragraphs of text, probably some examples and some subroutines: they provide a structure to the document.
Extends "DESCRIPTION" in OODoc::Text.
OVERLOADED
Extends "OVERLOADED" in OODoc::Text.
- overload: '""' (stringification)
-
Inherited, see "OVERLOADED" in OODoc::Text
- overload: '==' and '!=' (numeric comparison)
-
Inherited, see "OVERLOADED" in OODoc::Object
- overload: 'bool'
-
Inherited, see "OVERLOADED" in OODoc::Object
- overload: 'cmp' (string comparison)
-
Inherited, see "OVERLOADED" in OODoc::Text
METHODS
Extends "METHODS" in OODoc::Text.
Constructors
Extends "Constructors" in OODoc::Text.
- $obj->emptyExtension($container)
-
Create an empty copy of a structured text element, which is used at a higher level of inheritance to collect related subroutines and such.
- $class->new(%options)
-
Inherited, see "Constructors" in OODoc::Object
-Option --Defined in --Default container OODoc::Text <required> description OODoc::Text <empty string> level <required> linenr OODoc::Text <required> name OODoc::Text undef type OODoc::Text <required>
Attributes
Extends "Attributes" in OODoc::Text.
- $obj->container( [$object] )
-
Inherited, see "Attributes" in OODoc::Text
- $obj->description()
-
Inherited, see "Attributes" in OODoc::Text
- $obj->extends( [$object] )
-
Inherited, see "Attributes" in OODoc::Text
- $obj->level()
-
Returns the level of the text structure. Like in pod and html, a chapter will be 1, section 2, and subsection 3.
- $obj->linenr()
-
Inherited, see "Attributes" in OODoc::Text
- $obj->manual()
-
Inherited, see "Attributes" in OODoc::Text
- $obj->name()
-
Inherited, see "Attributes" in OODoc::Text
- $obj->niceName()
-
Returns the name of this chapter, section or sub-section beautified to normal caps. If the name does not contain lower-case characters, then the whole string is lower-cased, and then the first upper-cased.
- $obj->type()
-
Inherited, see "Attributes" in OODoc::Text
- $obj->unique()
-
Inherited, see "Attributes" in OODoc::Object
- $obj->where()
-
Inherited, see "Attributes" in OODoc::Text
Manual Repository
Extends "Manual Repository" in OODoc::Text.
- $obj->addManual($manual)
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->findManual($name)
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->mainManual($name)
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->manuals()
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->manualsForPackage($name)
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->packageNames()
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->publicationIndex()
-
Inherited, see "Manual Repository" in OODoc::Object
- $obj->publish(\%options)
-
Inherited, see "Manual Repository" in OODoc::Object
Location
- $obj->findEntry($name)
-
Find the chapter, section or subsection with this
$name
. The object found is returned. - $obj->path()
-
Represent the location of this chapter, section, or subsection as one string, separated by slashes.
example: path expression
print $subsect->path; # may print: METHODS/Container/Search
Collected
Extends "Collected" in OODoc::Text.
- $obj->addExample($object)
-
Inherited, see "Collected" in OODoc::Text
- $obj->all($method, \%parameters)
-
Call the
$method
recursively on this object and all its sub-structures. For instance, when called on a chapter, it first will call the$method
on that chapter, than on all its sections, subsections, and subsubsections. The%parameters
are passed with each call. The results of all calls is returned as LIST. - $obj->examples()
-
Inherited, see "Collected" in OODoc::Text
- $obj->findDescriptionObject()
-
Inherited, see "Collected" in OODoc::Text
- $obj->isEmpty()
-
Returns
true
if this text structure is only a place holder for something found in a super class. Structured elements are created with emptyExtension() on each sub-class pass the idea of order and to collect subroutines to be listed. However, in some cases, nothing is to be listed after all, and in that case, this method returnstrue
.example:
unless($chapter->isEmpty) ...
- $obj->openDescription()
-
Inherited, see "Collected" in OODoc::Text
Subroutines
Each manual page structure element (chapter, section, subsection, and subsubsection) can contain a list of subroutine descriptions.
- $obj->addSubroutine($objects)
-
A subroutine (OODoc::Text::Subroutine object) is added to the chapter, section, or subsection.
- $obj->setSubroutines(\@subs)
-
Sets the subroutines which are related to this text structure, replacing the preivous set. This is used when the manual pages are expanded into each-other to simplify working with the inheritance relations.
- $obj->subroutine($name)
-
Returns the subroutine with the specific name.
- $obj->subroutines()
-
Returns the list of subroutines which are related to this text object.
DIAGNOSTICS
- Error: manual definition requires manual object
-
A call to addManual() expects a new manual object (a OODoc::Manual), however an incompatible thing was passed. Usually, intended was a call to manualsForPackage() or mainManual().
SEE ALSO
This module is part of OODoc version 3.02, built on August 15, 2025. Website: https://perl.overmeer.net/oodoc/
LICENSE
For contributors see file ChangeLog.
This software is copyright (c) 2003-2025 by Mark Overmeer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.