NAME

Parameter - Class to define parameters of eg. a command.

SYNOPSIS

This is a placeholder class and are not to be used directly. To use the Parameter-classes, it is natural to instantiate a Parameter::Group-class and start from there.

DESCRIPTION

Class to define parameters of eg. a command. It defines the common, basic methods and attributes shared by the Parameter::Group- and Parameter::Variable-classes. It is only a placeholder class and is not meant to be instantiated.

An overview of concepts:

CONSTRUCTOR

new()

Sets up the parameter-classes and returns an instance of the class.

It accepts the following options:

This method returns an instantiated class upon success.

METHODS

clone()

Clones the whole instance

Accepts no input

Returns the reference to the copied object.

error()

Get the last error message, if any.

Accepts no input.

Returns the last error message that happened, if any.

escape()

Get or set if the instance is to be escaped or not.

In the case of set accepts one input: escape. 1 means true, 0 means false.

Upon either get or set, returns the current setting of the escape-attribute. Again, 1 means true, 0 means false.

name()

Get or set the name of instance.

In the case of set accepts one input: name. Name can only be in the character set of a-z, A-Z and 0-9.

Upon either get or set, returns the current name.

private()

Get or set if the instance is to be private or not.

In the case of set accepts one input: private. 1 means true, 0 means false.

Upon either get or set, returns the current setting of the private-attribute. Again, 1 means true, 0 means false.

toString()

Convert parameter-instance to a string.

Accepts no input.

This is a placeholder class and is to be overridden by inherting classes.

Returns a string or blank.

type()

Returns the type of the Parameter-instance.

Accepts no input.

Returns the type of the Parameter-instance, either "Group" or "Variable". The type- setting is set in the constructor of the inherited class.

quote()

Get or set if the instance is to be quoted or not.

In the case of set accepts one input: quote. 1 means true, 0 means false.

Upon either get or set, returns the current setting of the quote-attribute. Again, 1 means true, 0 means false.