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

OODoc::Text::Subroutine - collects information about one documented sub

INHERITANCE

 OODoc::Text::Subroutine
   is a OODoc::Text
   is a OODoc::Object

SYNOPSIS

DESCRIPTION

Perl has various things we can call "sub" (for "subroutine") one way or the other. This object tries to store all types of them: methods, funtion, ties, and overloads. Actually, these are the most important parts of the documentation. The share more than they differ.

METHODS

Attributes

$obj->parameters

    The parameter list for the subroutine is returned as string. The result may be undef or empty.

Collected

$obj->default(NAME|OBJECT)

    In case of a NAME, a default object for this method is looked up. This does not search through super classes, but solely which is defined with this subroutine. When passed an OBJECT of type OODoc::Text::Default that will be stored.

$obj->defaults

    Returns a list of all defaults as defined by this documentation item in one manual.

$obj->diagnostic(OBJECT)

    Add a new diagnostic message (a OODoc::Text::Diagnostic object) to the list already in this object. You can not look for a message because these names are without use.

$obj->diagnostics

    Returns a list of all diagnostics.

$obj->findOption(NAME)

    Does a little more thorrow job than option() bu searching the inherited options for this subroutine as well.

$obj->option(NAME|OBJECT)

    In case of a NAME, the option object for this method is looked up. This does not search through super classes, but solely which is defined with this subroutine. When passed an OBJECT of type OODoc::Text::Option that will be stored.

$obj->options

    Returns a list of all options as defined by this documentation item in one manual.

Container

$obj->container

$obj->manual

Examples

$obj->example(OBJECT)

$obj->examples

Initiation

OODoc::Text::Subroutine->new(OPTIONS)

Inheritance

$obj->collectedOptions

    Returns a list of option-default combinations on this subroutine.

$obj->location(MANUAL)

    Try to figure-out what the location for the subroutine is within the MANUAL page. Have a look at all levels of extension for this sub-routine's documentation and decides the best enclosing chapter, section and subsection. Then return that object for the current manual.

Commonly used functions

$obj->filenameToPackage(FILENAME)

OODoc::Text::Subroutine->filenameToPackage(FILENAME)

$obj->mergeObjects(OPTIONS)

$obj->mkdirhier(DIRECTORY)

OODoc::Text::Subroutine->mkdirhier(DIRECTORY)

$obj->unique

Manual database

All manuals can be reached everywhere in the program: it is a global collection.

$obj->addManual(MANUAL)

$obj->mainManual(NAME)

$obj->manuals

$obj->manualsForPackage(NAME)

$obj->packageNames

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().

Warning: order conflict "$take" before "$insert" in $file line $number

The order of the objects in a sub-class shall be the same as that of the super class, otherwise the result of merging of the information received from both classes is undertermined.

Warning: subroutine $self location conflict: $here $super

The location of subroutine descriptions must be consistent over the manual pages. You may change the level of clearness about the exact location (place in the chapter in one page, and in a subsection in the next), as long as it is not conflicting (the subsection must be a part of the chapter).

REFERENCES

See the OODoc website at $website for more details.

COPYRIGHTS

Module version $version. Written by Mark Overmeer (mark@overmeer.net). See the ChangeLog for other contributors.

Copyright (c) 2001-2002 by the authors. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.