Chris Josephes > ubertext > Text::UberText::Node::Command

Download:
ubertext-0.95.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.95   Source  

NAME ^

Text::UberText::Node::Command - UberText Command Node

DESCRIPTION ^

The Node::Command module handles processing an UberText command statement embedded within an UberText file. It is a subclass of the Text::UberText::Node class.

METHODS ^

The following methods are unique to the Node::Command module. For a full listing of the methods available, also check the Text::UberText::Node documentation.

$node->namespace();

Returns the namespace portion of the UberText command. Namespaces are an alphanumeric sequence, with the first character being a letter and are segmented with periods to create a hierarchial namespace.

Namespaces are case-insensitive and internally represented by transforming all characters to lowerspace.

The "uber.*" namespace is reserved and should not be used for private modules.

($command,$value)=$node->command();

Returns the command portion of the UberText command, and the value that was passed to the command (if any).

($value)=$node->commandValue();

Returns the value that was assigned to the command.

($bool,$value)=$node->getOpt($opt);

Returns whether or not a particular option was set, and the value passed along with the option (if any).

Options and values to options are, well, optional. Implementors need to make sure they test whether or not an option was set, and what value was passed to the option.

$node->setOpt($opt,$value);

Identifies an option as set, and specifies a value to go along with it.

($value)=$node->getOptValue($opt);

Returns only the value of an option. This routine may be easier to use when it comes to handling conditional evaluation.

$node->startBlock();

Identifies whether or not this Command node contains child elements.

$node->endBlock();

Identifies whether or not this Command node is the last element in a string of child elements.

$node->process();

Runs through the command string to break apart the namespace, the command, command value, and options.

$node->info();

Reports on the namespace, command, command value, and options.

AUTHOR ^

Chris Josephes <cpj1@visi.com>

SEE ALSO ^

Text::UberText::Node, Text::UberText::Text

COPYRIGHT ^

Copyright 2002, Chris Josephes. All rights reserved. This module is free software. It may be used, redistributed, and/or modified under the same terms as Perl itself. ~

syntax highlighting: