The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Agent - supplies agentspace methods for perl5.

SYNOPSIS

        use Agent;
   
        $my_agent = new Agent;
  $my_other_agent = new Agent;

        $my_agent->add( Name => 'AgentName',
                 Value => 'Test-Agent' );
        $my_agent->write( Name => 'AgentName'
                                                                         Value => 'Agent-Test' );

  $trs = $my_agent->packself();
  unpackself $my_other_agent Agent => $trs;

  $AgentsName = $my_other_agent->read(Name => 'AgentName');
   

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::packself method. Once it gets wherever it's going, use Agent::unpackself to turn it back into an object.

HISTORY

Agent 2.9 was written by James Duncan <jduncan@hawk.igs.net>, May 23, 1996. The original Agent (1.0) was written on May 21, 1996.