parrotcode: Configuration Step Base Class | |
Contents | Perl Modules |
Parrot::Configure::Step::Base - Configuration Step Base Class
use base qw(Parrot::Configure::Step::Base);
The Parrot::Configure::Step::Base
module contains the constructor and utility methods that should be inherited by all configuration steps.
new()
Basic constructor.
Accepts no arguments and returns a Parrot::Configure::Step:: object. Requires user to define an _init()
method in the inheriting configuration class. This initializer sets a description
attribute in the object's data structure and may set other attributes as well. Should the initializer fail to set a description
attribute, the constructor sets it to be an empty string. Hence, when a configuration step is executed by Configure.pl, the description for that step is always defined but may not be a true value.
description()
Accepts no arguments and returns the value of the description attribute. The description ought to be set in the _init()
initializer in the inheriting class's namespace. If it was not set there, the constructor sets it to an empty string.
args()
Accepts no arguments. In list context, returns a list of elements held in the args
attribute set in the _init()
initializer in the inheriting class's namespace. In scalar context, returns a reference to an array holding that same list.
set_result()
Accepts a scalar value and assigns it to the inheriting class's $result
variable. Returns the inheriting class's name.
result()
Accepts no arguments and returns the value of $result
from the inheriting class's namespace.
Joshua Hoblitt jhoblitt@cpan.org
docs/configuration.pod, Parrot::Configure, Parrot::Configure::Data, Parrot::Configure::Step
|