The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OODoc::Parser - base class for all OODoc parsers.

INHERITANCE

 OODoc::Parser
   is an OODoc::Object

 OODoc::Parser is extended by
   OODoc::Parser::Markov

SYNOPSIS

 # Never instantiated directly.

DESCRIPTION

A parser is used to process files which contain POD or contain code: their filename extension is pod, pm, or pl (actually, this can be configured).

Currently distributed parsers:

  • OODoc::Parser::Markov

    The Markov parser understands standard POD, but adds logical markup tags and the M<> links.

Extends "DESCRIPTION" in OODoc::Object.

OVERLOADED

Extends "OVERLOADED" in OODoc::Object.

METHODS

Extends "METHODS" in OODoc::Object.

Constructors

Extends "Constructors" in OODoc::Object.

OODoc::Parser->new(%options)
 -Option    --Default
  skip_links  undef

The parser should not attempt to load modules which match the REGEXP or are equal or sub-namespace of STRING. More than one of these can be passed in an ARRAY.

Inheritance knowledge

Extends "Inheritance knowledge" in OODoc::Object.

$obj->extends( [$object] )

Inherited, see "Inheritance knowledge" in OODoc::Object

Parsing a file

$obj->parse(%options)

Parse the specified input file into a code file and an object tree which describes the pod. Returned is a list of package objects which contain the docs found in this file.

 -Option--Default
  input   <required>
  output  <black hole>
input => FILENAME

The name of the input file.

output => FILENAME

Where to write the produced code to. If no filename is specified, the platform dependend black hole is used (/dev/null on UNIX).

Formatting text pieces

After the manuals have been parsed into objects, the information can be formatted in various ways, for instance into POD and HTML. However, the parsing is not yet complete: the structure has been decomposed with parse(), but the text blocks not yet. This is because the transformations which are needed are context dependent. For each text section cleanup() is called for the final touch.

$obj->cleanup($formatter, $manual, STRING)
$obj->skipManualLink($package)

Returns true is the $package name matches one of the links to be skipped, set by new(skip_links).

Commonly used functions

Extends "Commonly used functions" in OODoc::Object.

$obj->filenameToPackage($filename)
OODoc::Parser->filenameToPackage($filename)

Inherited, see "Commonly used functions" in OODoc::Object

$obj->mkdirhier($directory)
OODoc::Parser->mkdirhier($directory)

Inherited, see "Commonly used functions" in OODoc::Object

Manual Repository

Extends "Manual Repository" in OODoc::Object.

$obj->addManual($manual)

Inherited, see "Manual Repository" in OODoc::Object

$obj->mainManual($name)

Inherited, see "Manual Repository" in OODoc::Object

$obj->manual($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

DIAGNOSTICS

Error: The formatter type $class is not known for cleanup

Text blocks have to get the finishing touch in the final formatting phase. The parser has to fix the text block segments to create a formatter dependent output. Only a few formatters are predefined.

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 distribution version 2.02, built on December 08, 2021. Website: http://perl.overmeer.net/oodoc/

LICENSE

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