Gregor N. Purdy, Sr. > psh > Psh::Strategy

Download:
psh-1.8.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  1
View/Report Bugs
Source  

NAME ^

Psh::Strategy - a Perl Shell Evaluation Strategy (base class)

SYNOPSIS ^

  use Psh::Strategy;

DESCRIPTION ^

Psh::Strategy offers a procedural strategy list interface and a base class for developing strategies.

PROCEDURAL STRATEGY LIST ^

  Psh::Strategy::list()

Returns a list of active Psh::Strategy objects.

  my $obj= Psh::Strategy::get('name')

Loads and initializes a certain Psh::Strategy object

  Psh::Strategy::add($obj [, $suggest_position])

Adds a strategy object to the list of active strategies

  Psh::Strategy::remove($name)

Removes a strategy

  @list= Psh::Strategy::available_list()

Lists available strategies

  my $pos= find($name)

Finds the position of the named strategy

  my $flag= active($name)

Returns true if the named strategy is currently active

DEVELOPING STRATEGIES ^

You have to inherit from Psh::Strategy and you MUST at least override the functions consumes, applies, execute. You CAN also override the function runs_before

syntax highlighting: