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::Manual - Contains the information found in one manual about a package

INHERITANCE

 OODoc::Manual
   is a OODoc::Object

SYNOPSIS

 my $doc    = OODoc->new(...);
 my $manual = OODoc::Manual->new(name => ..., source => ...);

 $doc->manual($manual);
 my @manual = $doc->manualsForPackage('Mail::Box');

 print $manual->name;
 print $manual->package;

DESCRIPTION

METHODS

$obj->all(METHOD, PARAMETERS)

    Call OODoc::Text::Structure::all() on all chapters, passing the METHOD and PARAMETERS. In practice, this means that you can simply collect kinds of information from various parts within the manual page.

    Example:

     my @diags = $manual->all('diagnostics');

$obj->chapter(NAME|OBJECT)

    When a NAME (a string) given, the chapter with that name is returned, or undef when it is not known. With an OBJECT, that object is added to the list of chapters.

$obj->chapters([CHAPTERS])

    Returns the ordered list of chapter object for this manual.

overload: cmp

    String comparison takes place between a manual name and another manual name which may be a manual object or any other string or stringifyable object.

    Example:

     if($manual eq 'OODoc') ...
     if($man1 eq $man2) ...
     my @sorted = sort @manuals;    # implicit calls to cmp

$obj->collectPackageRelations

$obj->diagnostics(OPTIONS)

    All diagnostic messages of all chapters for this manual together.

     Option  Defined in  Default
     select              []     

    . select ARRAY

      Select only the diagnostic message of the specified types (case insensitive). Without any type, all are selected.

$obj->examples

    All examples of all chapters within this manual together, especially useful for counting.

    Example:

     print scalar $manual->examples;

$obj->expand

    Add the information of lower level manuals into this one.

$obj->extraCode([PACKAGES])

    Returns a list of manuals which contain extra code for this package When PACKAGES (names or objects) are specified, they are added first.

$obj->inherited(SUBROUTINE|OPTION)

    Returns whether the SUBROUTINE or OPTION was defined by this manual page, or inherited from it.

$obj->isPurePod

    Returns whether this package has real code related to it.

$obj->name

    Returns the name of the manual, which is found in the NAME chapter.

$obj->ownSubroutines

    Returns only the subroutines which are described in this manual page itself. subroutines() returns them all.

$obj->package

    Returns the package of the manual.

$obj->parser

    Returns the parser which has produced this manual object.

$obj->realizers([PACKAGES])

    Returns a list of packages which can realize into this object using Object::Realize::Later magic. When PACKAGES (names or objects) are specified, they are added first.

$obj->realizes([PACKAGE])

    Returns the class into which this class can be realized. This is a trick of the Object::Realize::Later module. The PACKAGE (name or object) will be set first, if specified.

$obj->source

    Returns the source of this manual information.

$obj->stats

    Returns a string which displays some stats about the manual.

overload: stringification

    Used in string context, a manual produces its name.

$obj->stripped

    The name of the produced stripped package file.

$obj->subClasses([PACKAGES])

    Returns the names of all sub-classes (extensions) of this package. When PACKAGES (names or objects) are specified, they are first added to the list.

$obj->subroutine(NAME)

    Returns the subroutine with the specified NAME as object reference.

$obj->subroutines

    All subroutines of all chapters within this manual together, especially useful for counting.

    Example:

     print scalar $manual->subroutines;

$obj->superClasses([PACKAGES])

    Returns the super classes for this package. PACKAGES (names or objects) will be added to the list of superclasses first.

Initiation

OODoc::Manual->new(OPTIONS)

Inheritance

$obj->extends([OBJECT])

Commonly used functions

$obj->filenameToPackage(FILENAME)

OODoc::Manual->filenameToPackage(FILENAME)

$obj->mergeObjects(OPTIONS)

$obj->mkdirhier(DIRECTORY)

OODoc::Manual->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().

Error: no name in manual in $source

Each documentation part requires a chapter NAME which starts with the manual name followed by a dash. Apparently, this was not found in the indicated file.

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.

Error: two chapters name $name in $filename line $ln1 and $ln2

The indicated file contains two chapters with the same name, which is not permitted. Join the contents of both parts.

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.