The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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. See Anansi::Component for inherited methods.

METHODS

content

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

 # OR

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

 # OR

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

 # OR

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

 # OR

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

Either returns the existing content or redefines the content.

finalise

 $OBJECT::SUPER->finalise(@_);

An overridden virtual method called during object destruction. Not intended to be directly called unless overridden by a descendant.

initialise

 $OBJECT::SUPER->initialise(@_);

An overridden virtual method called during object creation. Not intended to be directly called unless overridden by a descendant.

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();

 # OR

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

 # OR

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

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

parameter

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

 # OR

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

 # OR

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

 # OR

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

 # OR

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

 # OR

 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();

 # OR

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

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

AUTHOR

Kevin Treleaven <kevin AT treleaven DOT net>