NAME

Agent - supplies agentspace methods for perl5.

SYNOPSIS

	use Agent;
   

DESCRIPTION

Agent::new creates Agent objects, variables can be stored and retrieved within the Agent's agentspace with the Agent::add, Agent::write, and Agent::read methods. When the Agent needs to be transported, it can be packed completely via the Agent::sleep method. Once it gets wherever it's going, use Agent::wake to turn it back into an object. To set the importance (priority level) of the agentspace, use the Agent::setpriority method. You can set the level of priority to three different values: Urgent, Normal, and Low. This will eventully define how much precedence the agentspace will have on a remote machine, if lots of other agents are also running. The Agent::addcode method allows you to add some form of code to the agent. It does not matter what language the code is written in, except when a remote machine runs it, the particular remote machine must be able to read and parse that language.

Agent 2.91 should be backwardly compatible with the first release of Agent, even though Agentspace has had data compartments replaced and added.

Agent::new

$my_agent = new Agent;

Agent::new creates Agentspace objects.

Agent::add

$my_agent->add ( Name => 'A_Variable',  Value => 'Untyped_value' );  

Agent::add allows you to declare new variables inside the Agentspace.

Agent::write

$my_agent->write ( Name => 'An_Existing_Variable', Value => 'New_Value' );

Agent::write lets you re-write (Modify) existing Agentspace variables.

Agent::read

$my_value = $my_agent->read ( Name => 'A Variable' );

Agent::read lets you read variables out of the Agentspace.

Agent::addcode

$my_agent->addcode ( Code => 'any_code' );

 Agent::addcode lets you add information into the Codespace of the Agent.

Agent::setpriority

$my_agent->setpriority ( Level => 'Normal' );

Agent::setpriority allows you to set the execution priority level of the
Agentspace agent.  It has three levels: C<Urgent>, C<Normal>,  and C<Low>. 
All agents start with priority level set at normal. 

Agent::sleep

$my_var = $my_agent->sleep();

Agent::sleep returns a packed agentspace variable.  The contents of
this variable could then be transported in many ways.

Agent::wake

wake $my_agent Agent => $sleeping_agent;

Agent::wake is used to unpack agentspace created with packself.

Agent::contents

$my_agent_vars = $my_agent->var_contents();
$my_agent_code = $my_agent->code_contents();
$my_agent_level = $my_agent->getlevel();

Agent::contents returns the contents of the various compartments within
the agentspace.

HISTORY

Agent 1.0 General idea and bad implementation. Undistibuted! Agent 2.0 Better implementation. Undistributed! Agent 2.9 Decent implementation. First Distribtion! Agent 2.91 Decent implementation, works with Agentspace2 compartments. Distributed

AUTHOR

Agent/Agentspace code written by James Duncan <jduncan@hawk.igs.net>

CREDITS

 Thanks go out to Steve Purkis <spurkis@hawk.igs.net> and everyone who
has submitted oo modules to CPAN.