Agent::Static - an example static agent.
my $agent = new Agent( Name => 'Static', %args ); $agent->run;
The static agent remains local to one machine and acts as a host for other [transportable] agents. It is an example of how one might recieve incoming agents in a distributed environment.
The idea here is that a remote agent wishes to relocate to another host, and has packed itself up via the store() method. The remote agent sends the static agent a message containing its store()'d self, which the static agent then unpacks and executes.
The following arguments may be passed when creating a new static agent:
Address => address to [attempt to] register Medium => address medium Cpt => use Safe compartments? Thread => attempt to run agents in asynchronous threads verbose => verbose
All arguments are optional. The static agent will try to register TCP / 127.0.0.1:24368 if no medium/address is passed.
A static agent will accept messages of the form:
From: E<lt>addressE<gt> [E<lt>mediumE<gt>] E<lt>stored perl agentE<gt>
At the moment, as TCP is the only medium currently available, the <address> and <medium> are meaningless.
The other sample agents distributed with Agent Perl.
Steve Purkis <firstname.lastname@example.org>
Copyright (c) 1997, 1998 Steve Purkis. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The usual: perl5-agents people, most notably James Duncan.