| Author: | Mark Nodine |
|---|---|
| Contact: | mark.nodine@mot.com |
| Revision: | 1.2 |
| Date: | 2005-05-31 |
| Copyright: | This document has been placed in the public domain. |
This document extracts documentation from the internal Perl files.
Here are all the Perl subroutines used in the implementation of trip. This list is automatically generated by running perlsynopsis -l -m on the trip and *.pm files.
main::main(): (trip, 104)
The main entry point. Parses command-line options, preprocesses the writer schema, causes the document(s) to be read, and calls the writer.
main::DoEval($str, $line, $nosub): (trip, 178)
Precompiles a subroutine that evaluates an expression.
- Arguments:
- string expression, line number
- Returns:
- anonymous subroutine reference
- Exceptions:
- Program termination if error in evaluation
- Uses globals:
- None
- Sets globals:
- None
main::FirstDefined(): (trip, 192)
Returns the first defined value in an array.
- Argument:
- array
- Returns:
- value
main::ParseDOM($first_line): (trip, 203)
Parses a file in the DOM (pseudo-XML) format.
- Arguments:
- First line of file
- Returns:
- DOM object
- Uses globals:
- <> file handle
main::ParseSchema($writer): (trip, 281)
Parses the writer's schema file.
- Arguments:
- file name
- Returns:
- None
- Modifies globals:
- %HANDLER
main::ProcessDOM($dom): (trip, 341)
Passes the DOM through all phases of the writer and returns the output string.
- Arguments:
- parsed DOM
- Returns:
- string
main::ProcessDOMPhase($dom, $parent, $phase): (trip, 354)
Passes the DOM through a specific phase of the writer and returns the output string. Uses the current phase if no phase is specified.
- Arguments:
- parsed DOM, optional parent, optional phase name
- Returns:
- string returned from processing the phase
main::TraverseDOM($dom, $parent, $handarray): (trip, 364)
Traverses a parsed document object model (DOM) object and applies all the handler routines to their tags.
- Arguments:
- parsed DOM, parent DOM, ref to array of handler hash references.
main::TraverseDOM_($dom, $parent, $handarray, $searchstring): (trip, 373)
Internal routine called by TraverseDOM to do recursive handling of DOM tree.
- Arguments:
- parsed DOM, handler array reference, search string
main::WriterList(): (trip, 402)
Gets list of writers
- Arguments:
- none
- Returns:
- list of writers
main::Usage($what): (trip, 413)
Extracts and prints usage information
- Arguments:
- type of usage, end marker for usage (optional)
DOM::new($class, $tag, %attr): (DOM.pm, 27)
CLASS METHOD. Creates a new DOM object.
- Arguments:
- (optional) tag, (optional) list of attribute/value pairs
- Returns:
- DOM object
DOM::newPCDATA($class, $text): (DOM.pm, 41)
CLASS METHOD. Creates a new DOM object that is a "#PCDATA" type.
- Arguments:
- text
- Returns:
- DOM object
DOM::append($dom, @doms): (DOM.pm, 51)
INSTANCE METHOD. Appends to the contents of a DOM object.
- Arguments:
- DOM objects to append
- Returns:
- None
DOM::index($dom, $child): (DOM.pm, 61)
INSTANCE METHOD. Returns the index of a child in the contents (-1 if it does not occur).
- Arguments:
- child DOM object
- Returns:
- index number
DOM::last($dom): (DOM.pm, 74)
INSTANCE METHOD. Returns the last DOM in the contents of a DOM.
- Arguments:
- None
- Returns:
- last DOM object (or undefined)
DOM::prepend($dom, @doms): (DOM.pm, 88)
INSTANCE METHOD. Puts the arguments at the beginning of the contents of a DOM object.
- Arguments:
- DOM objects to append
- Returns:
- None
DOM::Recurse($dom, $sub, $parent, $when, @args): (DOM.pm, 105)
INSTANCE METHOD. Goes through a DOM object recursively calling a subroutine on every element. It can do either preorder, postorder or bothorder traversal (defaults to postorder). Unlike Reshape, it does not modify the children of the nodes it visits.
- Arguments:
- callback routine, parent, optional 'pre'/'post'/'both', optional additional arguments to be propagated
- Returns:
- Stop recursion flag
- Callback routine arguments:
- target DOM, parent, 'pre'/'post', optional additional arguments
- Callback routine returns:
- non-zero in 'pre' mode to avoid further recursion.
DOM::Reshape($dom, $sub, $parent, $when, @args): (DOM.pm, 142)
INSTANCE METHOD. Goes through a DOM object recursively calling a subroutine on every element. It can do either preorder, postorder or bothorder traversal (defaults to postorder).
- Arguments:
- callback routine, parent, optional 'pre'/'post'/'both', optional additional arguments to be propagated
- Returns:
- Reference to new set of contents for the parent
- Callback routine arguments:
- target DOM, parent, 'pre'/'post', optional additional arguments
- Callback routine returns:
- whatever list of DOM objects are to be substituted for the current node (this list is returned on the 'post' call if 'both' is selected).
Graph::new(): (Graph.pm, 27)
CLASS METHOD. Creates a new graph object.
- Returns:
- reference to a graph object
Graph::AddEdge($g, $p1, $p2): (Graph.pm, 35)
INSTANCE METHOD. Adds an edge to the graph.
- Arguments:
- point object 1, point object 2
- Returns:
- None
Graph::SetVertexProp($g, $p, $prop, $val): (Graph.pm, 46)
INSTANCE METHOD. Sets a user-defined property for a vertex.
- Arguments:
- point object, property name, property value
- Returns:
- None
Graph::GetVertexProp($g, $p, $prop): (Graph.pm, 56)
INSTANCE METHOD. Gets a user-defined property for a vertex.
- Arguments:
- point object, property name
- Returns:
- Property value
Graph::GetVertices($g): (Graph.pm, 66)
INSTANCE METHOD. Gets the list of vertices in the graph.
- Arguments:
- None
- Returns:
- array of point objects
Graph::GetVertexEdges($g, $p): (Graph.pm, 83)
INSTANCE METHOD. Gets a list of vertices adjacent to a vertex.
- Arguments:
- point object
- Returns:
- array of point objects
Graph::DFS($g, $p, $sub): (Graph.pm, 95)
INSTANCE METHOD. Does a Depth-First Search of a graph from a given starting point.
- Arguments:
- point object, callback routine
- Returns:
- None
- Callback routine arguments:
- graph, point
- Callback routine returns:
- None
Graph::_DFS($g, $p, $sub): (Graph.pm, 106)
Internal routine. Called recursively by DFS.
RST::init($doc): (RST.pm, 185)
Processes defaults for -D defines and resets global variables between documents.
- Arguments:
- document DOM object
- Returns:
- None
- Sets globals:
- $RST::NEXT_ID, %RST::SEC_LEVEL, @RST::SEC_DOM, @RST::SEC_STYLE, @RST::ANONYMOUS_TARGETS, %RST::REFERENCE_DOM, %RST::TARGET_NAME, %RST::ALL_TARGET_IDS, %RST::ALL_TARGET_NAMES, $RST::TOPDOM
RST::problematic($text, $refid, $id): (RST.pm, 220)
Returns a DOM object for a problematic with its ids.
- Arguments:
- message, reference id (optional), id (optional)
- Returns:
- DOM object, reference id, id
RST::system_message($level, $source, $lineno, $msg, $lit, %attr): (RST.pm, 233)
Returns a DOM object for a system message.
- Arguments:
- severity level, source, line number, message, literal text, key/value pairs for additional attributes
RST::BulletList($para, $source, $lineno): (RST.pm, 254)
Processes a bulleted list paragraph.
- Arguments:
- paragraph, source, line number
- Returns:
- processed paragraph, list of DOM objects and unprocessed paragraphs
RST::Coalesce($paras): (RST.pm, 283)
Coalesces a series of similar paragraphs and divides initial paragraph for unexpected indents.
- Argument:
- reference to array of paragraphs
- Returns:
- None (but modifies the paragraphs referenced by the argument)
RST::DefinitionList($para, $source, $lineno): (RST.pm, 530)
Processes a definition list paragraph.
- Arguments:
- paragraph, source, line number
- Returns:
- processed paragraph, list of DOM objects and unprocessed paragraphs
RST::Directive($parent, $source, $lineno, $errmsgid, $dtext, $lit): (RST.pm, 607)
Parses a directive and attaches it to a DOM if successful.
- Arguments:
- DOM object, source, line number, error message id, directive text, paragraph literal
- Returns:
- error flag, reference to array of DOM objects (possibly including input DOM), reference to array of unparsed paragraphs.
RST::EnumList($para, $source, $lineno): (RST.pm, 690)
Processes a enumerated list paragraph.
- Arguments:
- paragraph, source, line number
- Returns:
- processed paragraph, list of DOM objects and unprocessed paragraphs
RST::EnumType($index): (RST.pm, 735)
Given the initial index of an enumerated list, returns the enumeration type.
- Arguments:
- Initial index
- Returns:
- one of "arabic", "loweralpha", "upperalpha", "lowerroman", "upperroman"
RST::EnumVal($index, $enumtype): (RST.pm, 750)
Given an index of an enumerated and the enumeration type, returns the index value.
- Arguments:
- Index, enumerated type
- Returns:
- number or -1 (for badly formatted Roman numerals/arabic)
RST::Explicit($parent, $para, $source, $lineno): (RST.pm, 782)
Processes an explicit markup paragraph.
- Arguments:
- parent, paragraph, source, line number
- Returns:
- processed paragraph, new parent, list of DOM objects and unprocessed paragraphs
RST::FieldList($para, $source, $lineno): (RST.pm, 966)
Processes a field list paragraph.
- Arguments:
- paragraph, source, line number
- Returns:
- processed paragraph, list of DOM objects and unprocessed paragraphs
RST::Id(): (RST.pm, 1007)
Returns the next identifier.
- Arguments:
- None
- Uses global:
- $RST::NEXT_ID
RST::Inline($parent, $text, $source, $lineno): (RST.pm, 1014)
Parses inline markup.
- Arguments:
- DOM object of parent, text to parse, source, line number
- Returns:
- list of system_message DOMs if errors
RST::InlineEnd($text, $start, $outer_start): (RST.pm, 1259)
Finds the matching end mark for an inline start mark. Works even if there is intervening nested markup.
- Arguments:
- text, start mark, start mark of outer nesting (may be null)
- Returns:
- boolean indicating match found, text between marks, end mark, text after end mark
RST::InlineFindEnd($text, $start, $nest_start, $null_string_ok): (RST.pm, 1319)
Finds the first possible matching end mark for an inline start mark. Does not take into account intervening nested markup.
- Arguments:
- text, start mark, start mark of outer nesting (may be null)
- Returns:
- boolean indicating match found, text between marks, end mark, text after end mark
RST::InlineStart($text, $previous): (RST.pm, 1358)
Finds the place where inline markup starts.
- Arguments:
- text, character preceding text
- Returns:
- Boolean indicating markup was found, characters preceding markup start, start markup string, characters after markup start
RST::IsTable($text): (RST.pm, 1422)
Returns whether a reStructuredText string represents a valid table object.
- Arguments:
- string
- Returns:
- true or false
RST::LineBlock($para, $source, $lineno): (RST.pm, 1449)
Processes a line block paragraph.
- Arguments:
- paragraph, source, line number
- Returns:
- processed paragraph, list of DOM objects and unprocessed paragraphs
RST::NormalizeId($s, $implicit): (RST.pm, 1506)
Normalizes an attribute by putting it in lower case and replacing sequences of special characters with hyphens.
- Arguments:
- string, implicit
- Returns:
- normalized string
RST::NormalizeName($s): (RST.pm, 1526)
Normalizes an attribute by putting it in lower case and replacing sequences of spaces with a single space.
- Arguments:
- string
- Returns:
- normalized string
RST::OptionList($para, $source, $lineno): (RST.pm, 1550)
Processes an option list paragraph.
- Arguments:
- paragraph, source, line number
- Returns:
- processed paragraph, list of DOM objects and unprocessed paragraphs
RST::Paragraphs($parent, $text, $source, $lineno): (RST.pm, 1608)
Recursively parses a reStructuredText string that does not contain sections.
- Arguments:
- DOM object of parent, text to parse, source, start line number
- Returns:
- None, but appends parsed objects to the parent
RST::Parse($first_line, $eof): (RST.pm, 1887)
Parses a reStructuredText document.
- Arguments:
- First line of file, whether we're at end of file
- Returns:
- DOM object
- Uses globals:
- <> file handle
RST::QuoteSimpleTables($text): (RST.pm, 1952)
Quotes lines involved in simple tables that could be confused with section headers by starting them with a control-A (octal 001) character. Works only with properly formatted tables (ones followed by a blank line).
- Arguments:
- text string
- Returns:
- quoted text string
RST::RegisterName($dom, $source, $lineno): (RST.pm, 1976)
Registers a target name and returns an error DOM if it is an illegal duplicate.
- Arguments:
- target DOM, source, line number
- Returns:
- optional error DOM
- Uses globals:
- %TARGET_NAME
RST::SectionBreaks($parent, $text, $source, $lineno, $section): (RST.pm, 2047)
Parses any section breaks in the text.
- Arguments:
- DOM object of parent, text to parse, source, line number, first paragraph in section
- Returns:
- processed text, unprocessed text, new parent DOM object, list of DOM objects
RST::SimpleTable($text, $source, $lineno): (RST.pm, 2220)
Returns a DOM object for an RST table object given a simple table text string.
- Arguments:
- text string, source, line number
- Returns:
- DOM object
RST::Table($text, $source, $lineno): (RST.pm, 2441)
Returns a DOM object for an RST table object.
- Arguments:
- text string, source, line number
- Returns:
- DOM object
RST::Directive::admonition($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2625)
Built-in handler for admonition directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::contents($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2647)
Built-in handler for contents directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::figure($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2707)
Built-in handler for figure directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::image($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2764)
Built-in handler for image directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::include($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2813)
Built-in handler for include directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::line_block($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2860)
Built-in handler for line-block directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::meta($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2884)
Built-in handler for meta directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::raw($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 2972)
Built-in handler for raw directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::replace($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 3030)
Built-in handler for replace directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::sectnum($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 3071)
Built-in handler for sectnum directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::sidebar($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 3111)
Built-in handler for sidebar directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::target_notes($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 3145)
Built-in handler for target-notes directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::test_directive($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 3173)
Built-in handler for test_directive directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::topic($name, $parent, $source, $lineno, $dtext, $lit): (RST.pm, 3202)
Built-in handler for topic directives.
- Arguments:
- directive name, parent, source, line number, directive text, literal text
- Returns:
- array of DOM objects
RST::Directive::arg_check($name, $source, $lineno, $args, $lit, $exp): (RST.pm, 3235)
INTERNAL ROUTINE. Returns a system error if a directive argument check fails. May also be useful to plug-in directives.
- Arguments:
- name, source, lineno, args, lit text, expected # of args
- Returns:
- DOM if the check fails
RST::Directive::bad_option($name, $opt, $val, $level, $source, $lineno, $msg, $lit): (RST.pm, 3255)
INTERNAL ROUTINE. Returns a system message specifying a bad option. May also be useful to plug-in directives.
- Arguments:
- directive name, option name, option value, level, source, line number, message, optional literal block
- Returns:
- system_message DOM
RST::Directive::check_enum_option($name, $opt, $val, $vallist, $source, $lineno, $lit): (RST.pm, 3272)
INTERNAL ROUTINE. Returns a system message DOM if the option value does not parse as one of an enumerated list. May also be useful to plug-in directives.
- Arguments:
- directive name, option name, option value, ref to array of enum names, source, line number, literal
- Returns:
- error DOM or None
RST::Directive::check_int_option($name, $opt, $val, $source, $lineno, $lit): (RST.pm, 3296)
INTERNAL ROUTINE. Returns a system message DOM if the option value does not parse as integer. May also be useful to plug-in directives.
- Arguments:
- directive name, option name, option value, source, line number, literal
- Returns:
- error DOM or None
RST::Directive::check_option_names($name, $options, $optlist, $source, $lineno, $lit): (RST.pm, 3313)
INTERNAL ROUTINE. Returns a system message DOM if any of the options in the option hash are not in the legal option list array. May also be useful to plug-in directives.
- Arguments:
- directive name, reference to option hash, reference to array of legal option names, source, line number, literal
RST::Directive::handle_directive($name, $sub): (RST.pm, 3335)
Adds a handler for a directive. Used by plug-in directives to register a routine to call for a given directive name.
- Arguments:
- directive name, reference to directive subroutine
RST::Directive::parse_directive($dtext, $lit, $source, $lineno): (RST.pm, 3347)
INTERNAL ROUTINE. Parses the text of a directive into its arguments, options, and contents. May also be useful to plug-in directives.
- Arguments:
- Directive text, literal text, source, lineno
- Returns:
- Error DOM or directive arguments hash ref
RST::Directive::system_error(): (RST.pm, 3427)
INTERNAL ROUTINE. Returns a canonically formatted version of the last system error.
- Arguments:
- None
- Returns:
- error string
RST::Directive::system_message($name, $level, $source, $lineno, $msg, $lit, %attr): (RST.pm, 3437)
INTERNAL ROUTINE. Returns a DOM object for a system message, with 'Error in "name" directive" prepended to the message. May also be useful to plug-in directives.
- Arguments:
- directive name, level, source, lineno, message, literal string, attribute pairs
docutils::transforms::components::Filter($dom, $topdom, $parent, $details): (Transforms.pm, 51)
Processes a docutils.transforms.components.Filter transform.
- Arguments:
- pending DOM, top-level DOM, parent DOM, details hash reference
docutils::transforms::frontmatter::DocInfo($dom): (Transforms.pm, 76)
Processes a docutils.transforms.frontmatter.DocInfo transform. Processes field lists at the beginning of the DOM that are one of the docinfo types into a docinfo section.
- Arguments:
- top-level DOM
docutils::transforms::frontmatter::DocTitle($dom): (Transforms.pm, 246)
Processes a docutils.transforms.frontmatter.DocTitle transform. Creates a document title if the top-level DOM has only one top-level section. Creates a subtitle if a unique top-level section has a unique second-level section.
- Arguments:
- top-level DOM
docutils::transforms::misc::Pending($topdom): (Transforms.pm, 294)
Processes a docutils.transforms.misc.Pending transform. Traverses the DOM tree looking for Pending nodes and applies whatever internal transform was specified for them.
- Arguments:
- top-level DOM
docutils::transforms::parts::Contents($dom, $topdom, $parent, $details): (Transforms.pm, 323)
Processes a docutils.transforms.parts.Contents transform.
- Arguments:
- pending DOM, top-level DOM, parent DOM, details hash reference
docutils::transforms::parts::Sectnum($dom, $topdom, $parent, $details): (Transforms.pm, 435)
Processes a docutils.transforms.parts.Sectnum transform. Auto-numbers the sections in the document.
- Arguments:
- pending DOM, top-level DOM, parent DOM, details hash reference
docutils::transforms::references::AutoFootnotes($dom): (Transforms.pm, 522)
Processes a docutils.transforms.references.AutoFootnotes transform. Computes numbers for autonumbered footnotes.
- Arguments:
- top-level DOM
docutils::transforms::references::IndTargets($dom): (Transforms.pm, 571)
Processes a docutils.transforms.references.IndTargets transform. Links indirect targets to their eventual destination.
- Arguments:
- top-level DOM
docutils::transforms::references::CitationReferences($dom): (Transforms.pm, 643)
Processes a docutils.transforms.references.CitationReferences transform. Links citation references to their targets.
- Arguments:
- top-level DOM
docutils::transforms::references::CitationReferences_($dom, $parent): (Transforms.pm, 655)
INTERNAL ROUTINE. Used recursively by CitationReferences.
- Arguments:
- DOM object, parent
docutils::transforms::references::FootnoteReferences($dom): (Transforms.pm, 700)
Processes a docutils.transforms.references.FootnoteReferences transform. Links footnote references to their targets.
- Arguments:
- top-level DOM
docutils::transforms::references::References($dom): (Transforms.pm, 746)
Processes a docutils.transforms.references.References transform. Counts anonymous references, links references to their destinations, produces error messages if the number of anonymous references is insufficient.
- Arguments:
- top-level DOM
docutils::transforms::references::Unreferenced($dom): (Transforms.pm, 855)
Processes a docutils.transforms.references.Unreferenced transform. Produces messages for unreferenced targets.
- Arguments:
- top-level DOM
docutils::transforms::references::TargetNotes($dom, $topdom, $parent, $details): (Transforms.pm, 885)
Processes a docutils.transforms.references.TargetNotes transform. Constructs a list of external references and creates footnotes pointing to them.
- Arguments:
- pending DOM, top-level DOM, parent DOM, details hash reference
docutils::transforms::universal::Decorations($topdom): (Transforms.pm, 943)
Processes a docutils.transforms.universal.Decorations transform. Adds the "View docuemnt source", "Generated on" and "Generated by" decorations to the end of the document.
- Arguments:
- top-level DOM
docutils::transforms::universal::Messages($dom): (Transforms.pm, 994)
Processes a docutils.transforms.universal.Messages transform. Moves system messages at the end into "Docutils System Messages" section.
- Arguments:
- top-level DOM
docutils::transforms::universal::ScoopMessages($dom): (Transforms.pm, 1023)
Processes a docutils.transforms.universal.ScoopMessages transform. Moves system messages from anywhere in the DOM tree to the end of the top-level DOM.
- Arguments:
- top-level DOM
These are the principal data structures in trip as compiled from the Perl sources.
- Handler:
Hash reference with the following keys:
- tag:
- Regular expression for tag matching
- line:
- Line number where function is defined
- text:
- Textual representation of the code to run on tag match
- code:
Code reference for the code to run on tag match. The code is a subroutine with two arguments:
the matching DOM object
the string returned recursively from the content of this DOM.
It needs to return a string. Any string returned by the top level is printed to STDOUT.
- Handler array:
- Reference to array of handler objects.
- DOM:
Recursive hash reference with following keys:
- tag:
- The name of the tag of the DOM object
- attr:
- Reference to hash of attribute/value pairs
- content:
- Reference to array of DOM objects
- text:
- Contains the literal text for #PCDATA
- internal:
- Reference to hash of internal attribute/value pairs
- source:
- Optionally contains the source
- lineno:
- Optionally contains the line number
- lit:
- Optionally contains the literal text
- val:
- The value returned by the DOM's handler (added during traversal of the writer's handlers)
- Graph object:
A hash reference. The hash is accessed through two levels of indices representing the x-coordinate and the y-coordinate of a vertex in the graph. The next level of indexing is a hash reference with special keys
- edges:
- an array of point objects that are incident to the vertex
- props:
- a hash of user-defined properties on the vertex
- Point object:
- A reference to an array with two elements giving the x and y coordinates of the point.
- Directive arguments hash ref:
Returned by RST::Directive::parse_directive. It has keys:
- name:
- the directive name
- args:
- parsed arguments from dtext
- options:
- reference to hash of parsed option/value pairs
- content:
- parsed content from dtext
- content_lineno:
- line number of the content block
These are the global variables used in trip as compiled from the Perl sources.
- $main::TOP_FILE:
- Name of the top-level file being processed.
- %main::HANDLER:
- Hash whose keys are process phases and whose values are references to handler arrays.
- %main::PHASE:
- The writer phase currently being processed.
- @main::PHASES:
- Order in which process phases are evaluated.
- $main::opt_d:
- Debug mode
- $main::opt_w:
- The writer schema to be used.
- %main::opt_D:
- Hash whose keys are names of variables whose defines are specified on the command line with -D and whose values are the associated value (or 1 if no value is supplied)
- %main::opt_W:
- Hash whose keys are names of variables whose defines are specified on the command line with -W and whose values are the associated value (or 1 if no value is supplied)
- $main::MY_DIR:
- The real directory in which the trip script lives
- $main::VERSION:
- The trip version
Many static (read-only) variables defined in BEGIN blocks
- $RST::NEXT_ID:
- The next id to be returned by RST::Id();
- %RST::SEC_LEVEL:
- Hash whose keys are header styles and whose value (if defined) indicates the level of sections encoded with that header style.
- @RST::SEC_DOM:
- Array whose index is the section level and whose value is the section DOM object at that level.
- @RST::SEC_STYLE:
- Array whose index is the section level and whose value is the section style at that level.
- @RST::ANONYMOUS_TARGETS:
- Array of references to anonymous target DOMs in file order.
- %RST::REFERENCE_DOM:
- Hash whose keys are tags and whose values are references to a hash with names or ids as keys and the associated target DOM object as value.
- %RST::TARGET_NAME:
- Hash whose keys are namespace ids and whose values are references to a hash whose keys are names and whose value is a reference to an array of all the DOM objects having that name in that name space.
- %RST::ALL_TARGET_IDS:
- Hash whose keys are ids and whose value is a reference to an array of all the DOM objects having that id.
- %RST::ALL_TARGET_NAMES:
- Hash whose keys are names and whose value is a reference to an array of all the DOM objects having that name.
- %RST::IMPLICIT_SCHEME:
- Hash whose keys are the names of implicit URI schemes and whose values are 1.
- @Transforms::TRANSFORMS
- Array of transform names in the order they will be applied.