OODoc::Text - text component as found in a manual
OODoc::Text is an OODoc::Object OODoc::Text is extended by OODoc::Text::Default OODoc::Text::Diagnostic OODoc::Text::Example OODoc::Text::Option OODoc::Text::Structure OODoc::Text::Subroutine
# Cannot be instantiated itself
The parsers (implemented in the OODoc::Parser classes) scan the documentation as written down by the author of the module, and build a tree of these OODoc::Text objects from it. Then, any formatter (implemented by the OODoc::Format classes) can take this tree of text objects and convert it into manual pages.
Extends "DESCRIPTION" in OODoc::Object.
Extends "OVERLOADED" in OODoc::Object.
Returned is the name of the text object.
Numeric comparison is used to compare to objects whether they are identical. String comparison is overloaded to compare the names of the objects.
Names are compared.
Extends "METHODS" in OODoc::Object.
Extends "Constructors" in OODoc::Object.
-Option --Default container <required> description '' linenr <required> name undef type <required>
All text objects except chapters are contained in some other object.
The text which is contained in the body of this text item. Often, this is filled in later by openDescription().
The name contains the main data about the text piece.
The type of this text element. This is used for debugging only.
Extends "Inheritance knowledge" in OODoc::Object.
Inherited, see "Inheritance knowledge" in OODoc::Object
The text element which encapsulates the text element at hand. This defines the structure of the documentation. Only for chapters, this value will be undefined.
Returns the description text for this object. Nearly all objects contains some kind of introductory description.
The name of this text element. Stringification is overloaded to call this name method.
example:
print $text->name; print $text; # via overload
Returns the type name of this data object.
Without a $name, the manual of the text object is returned. With a $name, the manual with that name is returned, even when that does not have a relation to the object: it calls OODoc::Object::manual().
Returns a unique id for this text item. This is the easiest way to see whether two references to the same (overloaded) objects point to the same thing. The ids are numeric.
if($obj1->unique == $obj2->unique) {...} if($obj1 == $obj2) {...} # same via overload
Returns the source of the text item: the filename name and the line number of the start of it.
Add a new example (a OODoc::Text::Example object) to the list already in this object. You can not look for a specific because they have no real name (only a sequence number).
Returns a list of all examples contained in this text element.
From the current object, search in the extends until an object is found which has a content for the description field.
Returns a reference to the scalar which will contain the description for this object.
my $descr = $text->openDescription; $$descr .= "add a line\n";
Extends "Commonly used functions" in OODoc::Object.
Inherited, see "Commonly used functions" in OODoc::Object
Extends "Manual Repository" in OODoc::Object.
Inherited, see "Manual Repository" in OODoc::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().
Each text element is encapsulated by an other text element, except chapters. A value must be known for this container option to define the elements relative location.
container
This module is part of OODoc distribution version 2.02, built on December 08, 2021. Website: http://perl.overmeer.net/oodoc/
Copyrights 2003-2021 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the Artistic license. See http://dev.perl.org/licenses/artistic.html
To install OODoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OODoc
CPAN shell
perl -MCPAN -e shell install OODoc
For more information on module installation, please visit the detailed CPAN module installation guide.