NAME

Anansi::Script::Shell - Defines the mechanisms specific to handling command line execution.

SYNOPSIS

    my $OBJECT = Anansi::Script::Shell->new();

DESCRIPTION

This module is designed to be an optional component module for use by the Anansi::Script component management module. It defines the processes specific to handling both input and output from Perl scripts that are executed from a command line. Uses Anansi::ComponentManager (indirectly), Anansi::ScriptComponent and base.

INHERITED METHODS

addChannel

Declared in Anansi::Component.

channel

Declared in Anansi::Component.

componentManagers

Declared in Anansi::Component.

finalise

    $OBJECT->SUPER::finalise();

    $OBJECT->Anansi::Script::Shell::finalise();

Declared in Anansi::Class. Overridden by this module.

implicate

Declared in Anansi::Class. Intended to be overridden by an extending module.

import

Declared in Anansi::Class.

initialise

    $OBJECT->SUPER::initialise();

    $OBJECT->Anansi::Script::Shell::initialise();

Declared in Anansi::Class. Overridden by this module.

old

Declared in Anansi::Class.

removeChannel

Declared in Anansi::Component.

used

Declared in Anansi::Class.

uses

Declared in Anansi::Class.

METHODS

content

    my $contents = $OBJECT->content();

    if(1 == $OBJECT->content(undef, undef));

    if(1 == $OBJECT->channel('CONTENT', undef));

    if(1 == $OBJECT->content(undef, 'some content'));

    if(1 == $OBJECT->channel('CONTENT', 'some content'));

Either returns the existing content or redefines the content.

loadParameters

    $OBJECT->loadParameters();

Loads all of the argument values from the command line, assigning any names that are supplied to the values.

medium

    my $medium = Anansi::Script::Shell->medium();

    my $medium = $OBJECT->medium();

    my $medium = $OBJECT->channel('MEDIUM');

Returns the STRING description of the medium this module is designed to handle.

parameter

    my $parameters = $OBJECT->parameter();

    my $parameters = $OBJECT->channel('PARAMETER');

    my $parameterValue = $OBJECT->parameter(undef, 'parameter name');

    my $parameterValue = $OBJECT->channel('PARAMETER', 'parameter name');

    if($OBJECT->parameter(undef, 'parameter name' => 'parameter value', 'another parameter' => undef));

    if($OBJECT->channel('PARAMETER', 'parameter name' => 'parameter value', 'another parameter' => undef));

Either returns an ARRAY of all the existing parameter names or returns the value of a specific parameter or sets the value of one or more parameters. Assigning an "undef" value has the effect of deleting the parameter.

validate

    my $valid = $OBJECT->validate();

    my $valid = $OBJECT->channel('VALIDATE_AS_APPROPRIATE');

Determines whether this module is the correct one to use for handling Perl script execution.

NOTES

This module is designed to make it simple, easy and quite fast to code your design in perl. If for any reason you feel that it doesn't achieve these goals then please let me know. I am here to help. All constructive criticisms are also welcomed.

AUTHOR

Kevin Treleaven <kevin AT treleaven DOT net>